lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Revisting FieldCacheImpl
Date Thu, 29 Sep 2005 21:32:02 GMT

: I'm playing around with making the caching work at the
: field name/type level, and getting rid of cacheing by
: Reader.  What this would mean is that all searchers
: would use the same sorting; under certain
: circumstances, a new sorting could be created using
: data from an old, cached sorting, which might be
: detected based on changes to the IndexReader used, but
: wouldn't be keyed off of it.

Can you elaborate on how you would do this? ... how would you know when
opening a new searcher/reader wether or not the FieldCache for aparticular
field needed to be updated without walking the list of terms for that

I suppose there are some very limited cases where you can know that all of
the existing data is still valid (ie: if there were no docs in the old
reader marked deleted, and no docs in the new reader marked deleted) and
you can just "append" the data for any newly added docs to the end -- but
I think finding what that data is still requires iteration over the entire
TermEnum/TermDocs for that field.

The one simple change i can think of that might be possible is adding a
good IndexReader.hashCode method so that different instances of an
IndexReader which still refrence the exact same data won't require a
completely seperate copy of the FieldCache arrays -- possibly something
based on the Directory.hashCode and the IndexReader.getVersion -- assuming
those methods work the way i suspect they do.


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

View raw message