[Xapian-discuss] Sort by docid

Marco Tabini marcot at tabini.ca
Wed Jun 29 17:14:34 BST 2005


Hello,

I wonder if there is a way to cause Xapian to order a result set purely by
docid. In other words, once the result set has been determined, I'd like the
results to be returned to me ordered by their docid, as opposed to by their
match relevance.

The problem at hand is that I'm building a search engine for a mailing list
and I would like to return matches sorted by date; ordering by docid (since
the messages are indexed in chronological order) seems to be the simplest
way to do so, but because I'm running a probabilistic query I don't think I
can use Enquire::set_docid_order, since that will first sort by relevance
and then by docid.

I thought about adding the date as a value and then use set_sort_by_value,
but I wonder about performance (the database contains about one million
records).

Any thoughts?

Thanks,


Marco





More information about the Xapian-discuss mailing list