[Xapian-discuss] Result Priorities

Mike Boone mike at boonedocks.net
Tue Aug 24 22:14:27 BST 2004


Hi all,

I have a document search where certain documents are given a priority value.
Currently the priority is only 1 or 0, but it could possibly include a
couple more levels. I would like my search results to place the higher
priorty documents first (as long as it matches the search terms), even if a
lower priorty document has a higher relevance from the search terms. Using
my MySQL-based search, I just do a reverse sort on the priority level before
I sort on the relevance. I can think of a couple ways to do this:

* If there are only two priorities, complete two searches, one for each
level, and combine the results.
* Give the priority term a weighting (perhaps with 'within query
frequency'?) that will cause the higher priority results to always be on
top.
* Another method (some way to sort on a stored value, maybe)?

What's the best way to implement this in Xapian?

Thanks for your help (and answers to my previous questions).
Mike.
http://boonedocks.net/mike




More information about the Xapian-discuss mailing list