[Xapian-discuss] Get Document Position in Search

Ryan Bates ryan at railscasts.com
Thu Jul 9 22:56:49 BST 2009


On Thu, Jul 9, 2009 at 2:39 PM, James Aylett <james-xapian at tartarus.org>wrote:
>
> It's just a list of maps or something. I used to be heavily against
> sessions, but I've grown to accept them over time :-)
>
> (You have to do something clever to avoid the multiple open windows
> problem.)


Yeah, multiple tabs/windows is one reason I avoid too much session state. I
could normally store the offset in the URL but see below on why that won't
work.


> You might be able to ignore the database changing; it requires some
> thought about how you present it to yours users, but sometimes you can
> just ignore it and save yourself some code :)


In this situation the items are being edited at the same time (think of an
"edit next" button on a form). This spawns a background process which
updates the Xapian database within minutes, so the chances are quite high
the modifications will change the search results. Storing a simple offset
won't work here since it could easily skip records.

Ryan


More information about the Xapian-discuss mailing list