[email protected]
[Top] [All Lists]

Re: Efficiently paginating results.

Subject: Re: Efficiently paginating results.
From: Volodymyr Bychkoviak
Date: Fri, 28 Apr 2006 18:28:51 +0300
I'm caching hits by query. When accessing more documents Lucene automatically re-quering index to retrieve more document.
When index changes then I reopen IndexReader and clear cache.

Marc Dauncey wrote:
I read somewhere recently (maybe even on this list) a
recommendation to requery each time for successive
pages as this avoids some of the complexity involved
in session management. Whats peoples view of this?


--- karl wettin <[email protected]> wrote:

27 apr 2006 kl. 20.44 skrev Jean Sini:
Our application presents search results in a
paginated form.
We were unable to find Searcher methods that would
return, say, 'n'
(typically, 10) hits after a start offset 'k'.

So we're currently using the Hits collection
returned by
and using its Hits.doc(i) method to get the ith
hit, with i between
k and
k+n. Is that the most efficient way to do that? Is
there a better
way (e.g.
some form of Filter on the query itself)?
You probably want to do it just the way you do.

But cache the Hits somehow. Perhaps in a session,
perhaps globally in /your/ searcher. Perhaps the session points at the global cache so it doesn't change within a session when you flush the cache on index update.

To unsubscribe, e-mail:
[email protected]
For additional commands, e-mail:
[email protected]

___________________________________________________________ Yahoo! Photos -- NEW, now offering a quality print service from just 7p a photo http://uk.photos.yahoo.com

To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Volodymyr Bychkoviak

<Prev in Thread] Current Thread [Next in Thread>