Package org.apache.lucene.search

Examples of org.apache.lucene.search.Scorer.advance()


        int doc = -1;
        target = filterDocIdIterator.nextDoc();
        if (mapReduceWrapper == null) {
          while (target < DocIdSetIterator.NO_MORE_DOCS) {
            if (doc < target) {
              doc = scorer.advance(target);
            }

            if (doc == target) // permitted by filter
            {
              if (validator.validate(doc)) {
View Full Code Here


          }
        } else {
          // MapReduce wrapper is not null
          while (target < DocIdSetIterator.NO_MORE_DOCS) {
            if (doc < target) {
              doc = scorer.advance(target);
            }

            if (doc == target) // permitted by filter
            {
              if (validator.validate(doc)) {
View Full Code Here

   */
  public void testSpanNearScorerSkipTo1() throws Exception {
    SpanNearQuery q = makeQuery();
    Weight w = q.weight(searcher);
    Scorer s = w.scorer(searcher.getIndexReader(), true, false);
    assertEquals(1, s.advance(1));
  }
  /**
   * not a direct test of NearSpans, but a demonstration of how/when
   * this causes problems
   */
 
View Full Code Here

            if (validator.validate(target)) {
              collector.collect(target);
              target = scorer.nextDoc();
            } else {
              target = validator._nextTarget;
              target = scorer.advance(target);
            }
          }
        }
        if (mapReduceWrapper != null) {
          mapReduceWrapper.mapFullIndexReader(_subReaders[i], validator.getCountCollectors());
View Full Code Here

        int doc = -1;
        target = filterDocIdIterator.nextDoc();
        if (mapReduceWrapper == null) {
          while (target < DocIdSetIterator.NO_MORE_DOCS) {
            if (doc < target) {
              doc = scorer.advance(target);
            }

            if (doc == target) // permitted by filter
            {
              if (validator.validate(doc)) {
View Full Code Here

          }
        } else {
          // MapReduce wrapper is not null
          while (target < DocIdSetIterator.NO_MORE_DOCS) {
            if (doc < target) {
              doc = scorer.advance(target);
            }

            if (doc == target) // permitted by filter
            {
              if (validator.validate(doc)) {
View Full Code Here

        }
      }

      @Override
      public int advance(final int target) throws IOException {
        scorer.advance(target);
        if (scorer.docID() == DocIdSetIterator.NO_MORE_DOCS
            || (scorer.docID() >= 0 && predicate.get(scorer.docID()))) {
          return scorer.docID();
        }
        return nextDoc();
View Full Code Here

   */
  public void testSpanNearScorerSkipTo1() throws Exception {
    SpanNearQuery q = makeQuery();
    Weight w = q.weight(searcher);
    Scorer s = w.scorer(searcher.getIndexReader(), true, false);
    assertEquals(1, s.advance(1));
  }
  /**
   * not a direct test of NearSpans, but a demonstration of how/when
   * this causes problems
   */
 
View Full Code Here

   */
  public void testSpanNearScorerSkipTo1() throws Exception {
    SpanNearQuery q = makeQuery();
    Weight w = q.weight(searcher);
    Scorer s = w.scorer(searcher.getIndexReader(), true, false);
    assertEquals(1, s.advance(1));
  }
  /**
   * not a direct test of NearSpans, but a demonstration of how/when
   * this causes problems
   */
 
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.