On Mon, Feb 18, 2008 at 6:08 PM,  <[EMAIL PROTECTED]> wrote:
> We have the same situation and use an atomic counter.  Basically, we have
>  a SearcherHolder class and a SearcherManager class.  The SearcherHolder
>  holds the searcher and the number of threads referencing the searcher.
>
>  When the thread that writes to the index closes the index, it sends an
>  event that the SearcherManager is listening for.  The next time a search
>  is performed the manager opens a new searcher.  The old searcher is marked
>  as outdated but is not closed until the last thread that references the
>  searcher returns it.

That sounds interesting. Couldn't it be part of the core capabilities
of Lucene?

Stéphane


-- 
Large Systems Suck: This rule is 100% transitive. If you build one,
you suck" -- S.Yegge

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

Reply via email to