lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Extending Sort/FieldCache
Date Tue, 08 Sep 2009 22:29:21 GMT

: Thanks Mike. I did not phrase well my understanding of Cache reload. I
: didn't mean literally as part of the reopen, but *because* of the reopen.
: Because FieldCache is tied to an IndexReader instance, after reopen it gets
: refreshed. If I keep my own Cache, I'll need to code that logic, and I
: prefer to use what's currently in Lucene. (Sloth? :) )

but there is no actually refresh anywhere in Lucene ... the first time 
it's used on a reader, it's cached.  when that reader gets garbage 
collected, it's remved from the cache.  the only way the reopen/segment 
level sorting changed things is that in a multireader the indexreader refs 
put in the cache are all segment readers ... so if you reopen a 
multireader only the changed segments will need to be added to hte cache 
(the others will still be there)

but extending FieldCache doesn't really help you get any reuse out of that 
that you couldn't get with your own weakhashmap keyed on indexreaders -- 
the sorting code will always give your custom Sort the segment readers.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message