lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Tesser <jasontes...@gmail.com>
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()){
                        ir.close();
                    }
Is the if(ir != indexSearcher.getIndexReader()){   check needed?

Thanks,
Jason Tesser
dotCMS Lead Development Manager
1-305-858-1422

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