[Xapian-discuss] Get Document Position in Search

Ryan Bates ryan at railscasts.com
Thu Jul 9 22:14:39 BST 2009


Yeah, it's tricky to keep this kind of session state across requests to a
web app so I was hoping to avoid that. I also do expect the database to
change during the session which adds an extra layer of complexity to that
approach.
Still hoping there is some way to do this on a per-request basis since it
would greatly simplify things.

Thanks though,

Ryan


On Thu, Jul 9, 2009 at 2:08 PM, James Aylett <james-xapian at tartarus.org>wrote:

> 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?
> [snip]
>
> 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.
>
> J
>
> --
>  James Aylett
>
>  talktorex.co.uk - xapian.org - uncertaintydivision.org
>
> _______________________________________________
> Xapian-discuss mailing list
> Xapian-discuss at lists.xapian.org
> http://lists.xapian.org/mailman/listinfo/xapian-discuss
>


More information about the Xapian-discuss mailing list