java-user@lucene.apache.org
[Top] [All Lists]

Re: IndexSearcher cache

Subject: Re: IndexSearcher cache
From: Chris Hostetter
Date: Mon, 5 Mar 2007 16:06:46 -0800 PST
: initialized... I tried to create a seacher everytime but that lead me to
: the Too-Many-Files-Open exception. So no matter what I do I face a show
: stopper.

were you closing the old searcher before opening the new one?

even if that was the cause of your problem, i still wouldn't recomend
reopening the IndexSearcher on every single operation -- at least not
unless you are dealing with a single user application ... the performance
issues involved with opening a new IndexSearcher for every search may be
just as bad as opening a new IndexSearcher on every modification if you
are getting modifications often enough.

use a timed model where you reopen a new INdexSearcher every N seconds if
the index has been modified since the current one was opened.


-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: java-user-help@xxxxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>