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?

Thanks

Reply via email to