lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: IndexReader close listeners and NRT
Date Thu, 07 Nov 2013 10:58:37 GMT
You need to call .getCoreCacheKey() on each of the sub-readers
(returned by IndexReader.leaves()), to play well with NRT.

Typically you'd do so in a context that already sees each leaf, like a
custom Filter or a Collector.

Mike McCandless

On Thu, Nov 7, 2013 at 1:33 AM, Ravikumar Govindarajan
<> wrote:
> I am trying to cache a BitSet by attaching to IndexReader.addCloseListener,
> using the getCoreCacheKey()
> But, I find that getCoreCacheKey() returns the IndexReader object itself as
> the key.
> Whenever the IndexReader re-opens via NRT because of deletes, will it mean
> that my cache will be purged, because a new IndexReader is opened?
> Are there ways to avoid this purging?
> --
> Ravi

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

View raw message