RE: IndexReader.close() behavior

2011-05-13 Thread Alexey Lef
eSubReaders=false when you create your MultiReader? This way, the MultiReader incRefs on init and decRefs on close. But: what Lucene version are you using...? Mike http://blog.mikemccandless.com On Tue, Apr 26, 2011 at 8:46 AM, Alexey Lef wrote: > This is the code in IndexReader.close():

IndexReader.close() behavior

2011-04-26 Thread Alexey Lef
This is the code in IndexReader.close(): public final synchronized void close() throws IOException { if (!closed) { decRef(); closed = true; } } What strikes me as odd is that “closed” variable is set to true regardless of whether the index was actually closed using doClo

RE: File descriptor leak in ParallelReader.reopen()

2010-03-12 Thread Alexey Lef
010 at 11:31 PM, Alexey Lef wrote: > I believe there is in fact a difference between 2.4.1 and 3.0.1 as far as > leaking file descriptors is concerned. When sharing an IndexSearchere among > multiple threads, instead of closing an old IndexSearcher/IndexReader, we > used to follow t

RE: File descriptor leak in ParallelReader.reopen()

2010-03-11 Thread Alexey Lef
I believe there is in fact a difference between 2.4.1 and 3.0.1 as far as leaking file descriptors is concerned. When sharing an IndexSearchere among multiple threads, instead of closing an old IndexSearcher/IndexReader, we used to follow the good old advice to "just drop it on the floor and let

RE: Using ParallelReader over large immutable index and small updatable index

2007-03-06 Thread Alexey Lef
We use MultiSearcher for a similar scenario. This way you can keep the Searcher/Reader for the read-only index alive and refresh the small index Searcher whenever an update is made. If you have any cached filters, they are mapped to a Reader, so the cached filters for the big index will stay ali

RE: reusing MultiSearcher vs. reusing contained IndexSearchers

2005-11-20 Thread Alexey Lef
We have a very similar situation. We cache an IndexSearcher for each index and a MultiSearcher for each combination. Both IndexSearchers and MultiSearchers are created on demand (i.e. we don't prebuild every possible combination). I think caching MultiSearchers is not necessary because it is just