lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Multiple threads searching in Lucene and the synchronized issue. -- solution attached.
Date Tue, 09 May 2006 07:47:29 GMT

:   We found if we were using 2 IndexSearcher, we would get 10% performance
: benefit.
:   But if we increased the number of IndexSearcher from 2, the performance
: improvement became slight even worse.

Why use more then 2 IndexSearchers?

Typically 1 is all you need, except for when you want to open and "warm
up" a new Searcher because you know your index has changed on disk and
you're ready for those changes to be visible.

(I'm not arguing against your change -- concurrancy isn't my forte so i
have no opinion on wether your suggesting is good or not, i'm just
questioning the goal)

Acctually .. i don't know a lot about the internals of IndexSearcher and
TermInfosReader, but according to your description of the problem...

:   The class org.apache.lucene.index.TermInfosReader , as you know, every
: IndexSearcher will have one TermInfosReader. Every query, one method in the
: class must be called:
: private synchronized void ensureIndexIsRead() throws IOException . Notice

If the method isn't static, then how can two differnet instances of
IndexSearcher, each with their own TermInfosReader, block one another?


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

View raw message