FAQ
Hi,

for performance reasons I cache Hits for a certain Query in memcached,
for things like pageination etc. My question right now is if it is
possible to re-search such a cached Hits sets. That would be great for
features like live-learch and so on. Does Lucene support that?

Sascha

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org

Search Discussions

  • Chris Hostetter at Aug 6, 2008 at 9:22 pm
    : for performance reasons I cache Hits for a certain Query in memcached, for
    : things like pageination etc. My question right now is if it is possible to
    : re-search such a cached Hits sets. That would be great for features like
    : live-learch and so on. Does Lucene support that?

    You can hang on to a Hits object as long as you want -- provided you don't
    close the search that created it -- but i really doubt caching it in
    something like memcached is going to work the way you expect, Hits
    instances keep a refrence to the IndexSearcher that created them so they
    can fetch additional documents as needed ... you will most likely
    encounter strange errors if you do this.

    it's typically "fast enough" to just reissue the search, and if it's not
    then you need a better data structure to put in yourcache then Hits -- one
    that you very explicitly populate with however much data you expect to
    need. (think of Hits like an Iterator that pre-fetches and internally
    caches some of the items it needs, but if you exhaust those first few
    items, the Iterator needs to keep getting the rest)


    -Hoss


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedJul 17, '08 at 1:40p
activeAug 6, '08 at 9:22p
posts2
users2
websitelucene.apache.org

2 users in discussion

Sascha Fahl: 1 post Chris Hostetter: 1 post

People

Translate

site design / logo © 2022 Grokbase