Package org.apache.lucene.index

Examples of org.apache.lucene.index.AtomicReader.termDocsEnum()


    MockAnalyzer mockAnalyzer = new MockAnalyzer(random());
    mindex.addField("field", "the quick brown fox", mockAnalyzer);
    AtomicReader reader = (AtomicReader) mindex.createSearcher().getIndexReader();
    assertNull(reader.getNumericDocValues("not-in-index"));
    assertNull(reader.getNormValues("not-in-index"));
    assertNull(reader.termDocsEnum(new Term("not-in-index", "foo")));
    assertNull(reader.termPositionsEnum(new Term("not-in-index", "foo")));
    assertNull(reader.terms("not-in-index"));
  }
 
  public void testDuellMemIndex() throws IOException {
View Full Code Here


    OpenBitSet matchedDocumentsIds = new OpenBitSet( atomicReader.maxDoc() );
    Boolean found = false;
    for ( int i = 0; i < spatialHashCellsIds.size(); i++ ) {
      Term spatialHashCellTerm = new Term( fieldName, spatialHashCellsIds.get( i ) );
      DocsEnum spatialHashCellsDocs = atomicReader.termDocsEnum( spatialHashCellTerm );
      if ( spatialHashCellsDocs != null ) {
        while ( true ) {
          final int docId = spatialHashCellsDocs.nextDoc();
          if ( docId == DocIdSetIterator.NO_MORE_DOCS ) {
            break;
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.