lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cheng <>
Subject Is it necessary to create a new searcher?
Date Wed, 11 Jan 2012 22:51:55 GMT
I am currently using the following statement at the end of each index
writing, although I don't know if the writing modifies the indexes or not:

is = new IndexSearcher(IndexReader.openIfChanged(ir));

# is -> IndexSearcher, ir-> IndexReader

My question is how expensive to create a searcher instance (I have
potentially hundreds of thousands of docs added or modified so the cost to
create a new searcher instance may be unbearable.)

Should I use the IndexReader.isCurrent() instead to check if is current?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message