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?
Marc
--- 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
Searcher.search,
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]
--
regards,
Volodymyr Bychkoviak