lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: old fashioned....."Too many open files"!
Date Fri, 18 May 2012 17:19:24 GMT

: the point is that I keep the readers open to share them across search. Is
: this wrong?

your goal is fine, but where in your code do you think you are doing that? 

I don't see any readers ever being shared.  You open new ones (which are 
never closed) in every call to getSearcher()....

: > >        while(i.hasNext()){
: > >            Map.Entry index = (Map.Entry)i.next();
: > >            IndexWriter iw = (IndexWriter)index.getValue();
: > >            readers.add(IndexReader.open(iw, true));
: > >        }
: > >
: > >        MultiReader mr = new MultiReader(readers.toArray(readerList));
: > >        return new IndexSearcher(mr);


-Hoss

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


Mime
View raw message