: 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-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org