Package org.apache.lucene.index

Examples of org.apache.lucene.index.IndexReader.incRef()


  public IndexSearcherClosable getIndexSearcher() throws IOException {
    final IndexReader indexReader;
    _indexRefreshReadLock.lock();
    try {
      indexReader = _indexReader.get();
      indexReader.incRef();
    } finally {
      _indexRefreshReadLock.unlock();
    }
    if (indexReader instanceof ExitableReader) {
      ((ExitableReader) indexReader).reset();
View Full Code Here


      }
      finally {
        writeLock.unlock();
      }
    }
    indexReader.incRef();
    return indexReader;
  }

  @Override
  public void closeIndexReader(IndexReader reader) {
View Full Code Here

      }
      finally {
        writeLock.unlock();
      }
    }
    indexReader.incRef();
    return indexReader;
  }

  @Override
  public void closeIndexReader(IndexReader reader) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.