lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <>
Subject Re: TermInfosReader lazy term index reading
Date Fri, 02 Feb 2007 20:29:03 GMT
On 2/2/07, Doug Cutting <> wrote:
> Yonik Seeley wrote:
> > What was the use-case behind loading the term index lazily?
> > I'm having a hard time figuring out what one would do with an
> > IndexReader that doesn't involve a term lookup somehow.
> Index merging only iterates through terms.

Ah, that makes sense.

I ran across a situation where a great number of threads were blocked on
ensureIndexIsRead(), even after it had already been loaded.  I was
wondering if it was worth trying to get rid of the sync block.  It
wouldn't totally fix the issue, but it might improve things.

One could signal the SegmentReader to lazy-load or not, and then the
sync block could be moved inside an "if" that only executed if lazy
loading was on (or it could also be overridden in a subclass to do
nothing if lazy loading was off).


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

View raw message