lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trejkaz <>
Subject Re: Can I still use SearcherManager in this situation?
Date Sat, 10 Nov 2012 05:49:05 GMT
On Thu, Nov 8, 2012 at 8:29 AM, Trejkaz <> wrote:
> It's not only protected... but the class is final as well (the method
> might as well be private so that it doesn't give a false sense of hope
> that it can be overridden.)
> I might have to clone the whole class just to make the method public.

What I have ended up doing is wrapping SearcherManager and putting in
my own locking logic borrowed from Lucene 4. So when I call
maybeRefresh(), I know only one thread is doing it, which means I know
the refresh will occur before the method returns. This seems to work
fine and avoids duplicating much code. Once we switch to Lucene 4, I
can throw away my wrapper class as the method names match those of
Lucene 4's SearcherManager.


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

View raw message