You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by "Beard, Brian" <Br...@mybir.com> on 2007/06/19 14:59:12 UTC

MultiSearcher holds on to index - optimization not one segment

We're using a MultiSearcher to search against multiple lucene indexes
which runs inside of a web application in jboss 4.0.4.

We're also using a standalone app running in a different jboss server
which gets periodic updates from an oracle database and updates the
lucene index.

Both the searcher and indexer are running against the same index. We
need to have real time updates to the index that are searchable.

The problem I'm having is once the MultiSearcher is open, it holds on to
the index file (Trying to encourage garbage collection in java, but only
goes so far). 

So it looks like when an optimization is performed, it won't actually
consolidate the index into one segment because there's a reader out
there still holding on to the index.

This may not be lucene related, may be java or jboss, but I figure
others have probably encountered this type of thing before. Any ideas
are appreciated.

Brian Beard



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: MultiSearcher holds on to index - optimization not one segment

Posted by Yonik Seeley <yo...@apache.org>.
On 6/19/07, Beard, Brian <Br...@mybir.com> wrote:
> The problem I'm having is once the MultiSearcher is open, it holds on to
> the index file

An IndexReader holds open the files... this is a feature.  Not holding
the file open would mean that the index would actively change while
being searched.  Lucene is designed to search on a static index (but
one that can be updated in the background with no impact to the
current open readers).

-Yonik

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org