Examples of nextDoc()


Examples of com.browseengine.bobo.docidset.FilteredDocSetIterator.nextDoc()

    }
   
    try
    {
      int doc;
      while((doc=filteredIter.nextDoc())!=DocIdSetIterator.NO_MORE_DOCS)
      {
        if (!bs.get(doc)){
          fail("failed: "+doc+" not in expected set");
          return;
        }

Examples of org.apache.lucene.index.DocsAndPositionsEnum.nextDoc()

            BoboTerm boboTerm = new BoboTerm();
            boboTerm.term = text.utf8ToString();
            boboTerm.freq = (int) termsEnum.totalTermFreq();
            docsAndPositions = termsEnum.docsAndPositions(null, docsAndPositions);
            if (docsAndPositions != null) {
              docsAndPositions.nextDoc();
              boboTerm.positions = new ArrayList<Integer>();
              boboTerm.startOffsets = new ArrayList<Integer>();
              boboTerm.endOffsets = new ArrayList<Integer>();
              for (int t = 0; t < boboTerm.freq; ++t) {
                boboTerm.positions.add(docsAndPositions.nextPosition());

Examples of org.apache.lucene.index.DocsEnum.nextDoc()

      }
      TermsEnum termsEnum = terms.iterator(null);
      DocsEnum docs = null;
      while(termsEnum.next() != null) {
        docs = _TestUtil.docs(random(), termsEnum, MultiFields.getLiveDocs(reader), docs, DocsEnum.FLAG_FREQS);
        while(docs.nextDoc() != DocIdSetIterator.NO_MORE_DOCS) {
          totalTokenCount2 += docs.freq();
        }
      }
    }
    reader.close();

Examples of org.apache.lucene.index.DocsEnum.nextDoc()

          termsEnum = terms.iterator(termsEnum);
          if (termsEnum.seekExact(catTerm)) {
            // liveDocs=null because the taxonomy has no deletes
            docs = termsEnum.docs(null, docs, 0 /* freqs not required */);
            // if the term was found, we know it has exactly one document.
            doc = docs.nextDoc() + ctx.docBase;
            break;
          }
        }
      }
    } finally {

Examples of org.apache.lucene.index.DocsEnum.nextDoc()

              // hence documents), there are no deletions in the index. Therefore, it
              // is sufficient to call next(), and then doc(), exactly once with no
              // 'validation' checks.
              CategoryPath cp = new CategoryPath(t.utf8ToString(), delimiter);
              docsEnum = termsEnum.docs(null, docsEnum, DocsEnum.FLAG_NONE);
              boolean res = cache.put(cp, docsEnum.nextDoc() + ctx.docBase);
              assert !res : "entries should not have been evicted from the cache";
            } else {
              // the cache is full and the next put() will evict entries from it, therefore abort the iteration.
              aborted = true;
              break;

Examples of org.apache.lucene.index.DocsEnum.nextDoc()

        while (te.next() != null) {
          String value = te.term().utf8ToString();
          CategoryPath cp = new CategoryPath(value, delimiter);
          final int ordinal = addCategory(cp);
          docs = te.docs(null, docs, DocsEnum.FLAG_NONE);
          ordinalMap.addMapping(docs.nextDoc() + base, ordinal);
        }
        base += ar.maxDoc(); // no deletions, so we're ok
      }
      ordinalMap.addDone();
    } finally {

Examples of org.apache.lucene.index.DocsEnum.nextDoc()

        }

        Term term = new Term(field, strText);
        DocsEnum docsEnum = reader.termDocsEnum(term);
        if (docsEnum != null) {
          while ((docID = docsEnum.nextDoc()) != DocsEnum.NO_MORE_DOCS) {
            df++;

            if (!loader.add(docID, valId)) {
              logOverflow(fieldName);
            } else {

Examples of org.apache.lucene.index.NumericFieldUpdates.UpdatesIterator.nextDoc()

                      // an approximantion of maxDoc, used to compute best bitsPerValue
                      fieldUpdates = new NumericFieldUpdates.PackedNumericFieldUpdates(mergeState.segmentInfo.getDocCount());
                      mergedFieldUpdates.put(field, fieldUpdates);
                    }
                    fieldUpdates.add(newDoc, updatesIter.value() == null ? NumericUpdate.MISSING : updatesIter.value());
                    updatesIter.nextDoc(); // advance to next document
                  } else {
                    assert updatesIter.doc() > j : "updateDoc=" + updatesIter.doc() + " curDoc=" + j;
                  }
                }
              }

Examples of org.apache.lucene.queries.function.ValueSourceScorer.nextDoc()

    FunctionValues values = vs.getValues(new HashMap<String,Object>(), leaf);
   
    // everything
    ValueSourceScorer scorer = values.getRangeScorer(leaf.reader(), "4", "40", true, true);
    assertEquals(-1, scorer.docID());
    assertEquals(0, scorer.nextDoc());
    assertEquals(1, scorer.nextDoc());
    assertEquals(2, scorer.nextDoc());
    assertEquals(DocIdSetIterator.NO_MORE_DOCS, scorer.nextDoc());

    // just the first doc

Examples of org.apache.lucene.search.DocIdSetIterator.nextDoc()

    }
   
    try
    {
      int doc;
      while((doc=filteredIter.nextDoc())!=DocIdSetIterator.NO_MORE_DOCS)
      {
        if (!bs.get(doc)){
          fail("failed: "+doc+" not in expected set");
          return;
        }
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.