lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luke Shannon" <lshan...@hypermedia.com>
Subject Re: Index File
Date Mon, 15 Nov 2004 17:08:41 GMT
Hi Luke;

I have tried to implement a system where the search method is aware whether
the index folder has been updated or not (so it only creates a new searcher
when required). However, due to the environment this process is running in
it turned out not to be a simple task. I need to move on to some out
standing document types I still need to handle. But before I do that...

When you said "performance boost" how substaintal might this be? For now
each time I finish with a Searcher I close it and set the reference to null.
The application this is running in monitors the levels of memory being
utilized. If utilization gets to high it requests the garbage collector to
run.

I am not totally sure I totally understand risks involved with the
FileHandlers issue you brought up, or what kind of burden I may be putting
on performance by not putting better logic around the creation of the
IndexSearcher. I hoping things will be ok as they are until I can dedicate
more time to the issue.

Are there specific errors or behavior I should look for if I start to run
out of FileHandlers?

Luke
----- Original Message ----- 
From: "Luke Francl" <luke.francl@stellent.com>
To: "Lucene Users List" <lucene-user@jakarta.apache.org>
Sent: Monday, November 15, 2004 11:03 AM
Subject: Re: Index File


> On Mon, 2004-11-15 at 09:52, Luke Shannon wrote:
> > Once this was modified to create a new IndexerSearch for every search
> > request, all my problems went away.
>
> Be careful with this. You could conceivably run out of file handles.
> This problem got a lot better in Lucene 1.3 with the compound file
> format, it could still happen if you have a lot of heap and aren't
> garbage collecting very often. So close the old one when you're done
> with it.
>
> Also, creating a new IndexSearcher only when the index has been modified
> will give you a performance boost because you do not have to open the
> index with every search.
>
> Luke Francl
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>



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


Mime
View raw message