On 2/2/07, Doug Cutting <[EMAIL PROTECTED]> 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).

-Yonik

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to