lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Tesser <>
Subject Is it safe to use reopen on IndexReader
Date Wed, 31 Mar 2010 12:36:04 GMT
Is it safe to use reopen on IndexReader if their are other threads who had
readers out or do I need to use a ref counter to make sure all readers are
checked in?

Secondly right now we also check this when we reopen
IndexReader ir = indexSearcher.getIndexReader();
                    indexSearcher = new IndexSearcher(ir.reopen(true));
                    if(ir != indexSearcher.getIndexReader()){
Is the if(ir != indexSearcher.getIndexReader()){   check needed?

Jason Tesser
dotCMS Lead Development Manager

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