lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Smith <>
Subject Re: Index Partitioning ( was Re: Search deadlocking under load)
Date Sun, 10 Jul 2005 23:24:57 GMT

On 11/07/2005, at 9:15 AM, Chris Hostetter wrote:

> : Nathan's point about pooling Searchers is something that we also
> : addressed by a LRU cache mechanism.  In testing we also found that
> Generally speaking, you only ever need one active Searcher, which  
> all of
> your threads should be able to use.  (Of course, Nathan says that  
> in his
> code base, doing this causes his JVM to freeze up, but I've never seen
> this myself).
Thanks for your response Chris.  Do you think we are going down a  
deadly path by having "many smaller" IndexSearchers open rather than  
"one very large one"?

> As I understand it, the general rule is: if you call  
>, you
> better call .close() on that reader.  If you construct and  
> IndexSearcher
> using a Directory or a path, then calling .close() on the searcher  
> will
> take care of closing the reader -- but if your code look like this...
>     Searcher s = new IndexSearcher(
> ...then you are screwed, because nothing will ever close that  
> reader and
> free it's resources.

That was my initial thought when Nathan outlined is issue.  I've seen  
that happen before myself.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message