Examples of decRef()


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

    IndexReader reader = getRunData().getIndexReader();
    getRunData().setIndexReader(null);
    if (reader.getRefCount() != 1) {
      System.out.println("WARNING: CloseReader: reference count is currently " + reader.getRefCount());
    }
    reader.decRef();
    return 1;
  }

}
View Full Code Here

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

    if (closeSearcher) {
      reader.close();
    } else {
      // Release our +1 ref from above
      reader.decRef();
    }
    return res;
  }

  protected Collector createCollector() throws Exception {
View Full Code Here

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

    final IndexReader newIndexReader = writerHolder.openNRTIndexReader( flushDeletes );
    final IndexReader oldReader = currentReader.getAndSet( newIndexReader );
    this.currentReaderGen = openingGen;
    try {
      if ( oldReader != null ) {
        oldReader.decRef();
      }
    }
    catch (IOException e) {
      log.unableToCloseLuceneIndexReader( e );
    }
View Full Code Here

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

    if (closeSearcher) {
      searcher.close();
    } else {
      // Release our +1 ref from above
      reader.decRef();
    }
    return res;
  }

View Full Code Here

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

      map.put(OpenReaderTask.USER_DATA, userData);
      reader.flush(map);
    } else {
      reader.flush();
    }
    reader.decRef();
    return 1;
  }
}
View Full Code Here

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

    final IndexReader newIndexReader = writerHolder.openNRTIndexReader( flushDeletes );
    final IndexReader oldReader = currentReader.getAndSet( newIndexReader );
    this.currentReaderGen = openingGen;
    try {
      if ( oldReader != null ) {
        oldReader.decRef();
      }
    }
    catch ( IOException e ) {
      log.unableToCloseLuceneIndexReader( e );
    }
View Full Code Here

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

    if (closeSearcher) {
      searcher.close();
      reader.close();
    } else {
      // Release our +1 ref from above
      reader.decRef();
    }
    return res;
  }

  protected Collector createCollector() throws Exception {
View Full Code Here

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

  public int doLogic() throws IOException {
    IndexReader r = getRunData().getIndexReader();
    IndexReader nr = IndexReader.openIfChanged(r);
    if (nr != null) {
      getRunData().setIndexReader(nr);
      nr.decRef();
    }
    r.decRef();
    return 1;
  }
}
View Full Code Here

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

    if (closeSearcher) {
      searcher.close();
      reader.close();
    } else {
      // Release our +1 ref from above
      reader.decRef();
    }
    return res;
  }

  protected Collector createCollector() throws Exception {
View Full Code Here

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

  public int doLogic() throws IOException {
    IndexReader r = getRunData().getIndexReader();
    IndexReader nr = r.reopen();
    if (nr != r) {
      getRunData().setIndexReader(nr);
      nr.decRef();
    }
    r.decRef();
    return 1;
  }
}
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.