[Xapian-discuss] Get Document Position in Search

James Aylett james-xapian at tartarus.org
Thu Jul 9 22:08:15 BST 2009

On Thu, Jul 09, 2009 at 01:52:08PM -0700, Ryan Bates wrote:

> Is there any way to determine the position of a given document in a search
> result without fetching all records?

I don't believe so; my response would probably be to implement a
caching layer in the session so you know where in the search results
you are, and can dip back out or move forward/backwards in the
document-as-search-result view. You could cache the salient parts of
the MSet (say 10 at a time) to avoid hitting the search service all
that often, although you may have to do a clever dance if the database
changes underneath you.


  James Aylett

  talktorex.co.uk - xapian.org - uncertaintydivision.org

More information about the Xapian-discuss mailing list