[Xapian-discuss] rank all documents

Olly Betts olly@survex.com
Thu, 20 May 2004 15:15:20 +0100


On Thu, May 20, 2004 at 02:05:24PM +0100, Sam Liddicott wrote:
> 
> "Hongyan" <hym@ucla.edu>:
> > I wonder whether we can rank all documents to a certain query with
> > Xapian and Omega.
> >
> > We want to visualize a small text database with 100 articles. For
> > any given query, we need all the document weights, including lower
> > weights than 0.5 (0 too)

When you say "all documents" and "(0 too)", are you meaning that you
want to see documents which don't contain any terms from the query too?

If so, you can't do that directly with Xapian.  But it wouldn't be
hard to postprocess the results with a couple of lines of perl (or
whatever) to add missing documents to the end with a weight of 0.
    
> You need to tell it that you want 100 documents per page

That's right - set HITSPERPAGE to a value larger than the database size.
Currently it is clamped internally to maximum value of 1000 - if you
start using larger databases, you'll need to remove that limit (look
in omega.cc and search for HITSPERPAGE).

Cheers,
    Olly