Package org.apache.lucene.queries.function

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
View Full Code Here


   
    // 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
    scorer = values.getRangeScorer(leaf.reader(), "4", "40", false, false);
View Full Code Here

    // 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
    scorer = values.getRangeScorer(leaf.reader(), "4", "40", false, false);
    assertEquals(-1, scorer.docID());
View Full Code Here

    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
    scorer = values.getRangeScorer(leaf.reader(), "4", "40", false, false);
    assertEquals(-1, scorer.docID());
    assertEquals(0, scorer.nextDoc());
View Full Code Here

    assertEquals(DocIdSetIterator.NO_MORE_DOCS, scorer.nextDoc());

    // just the first doc
    scorer = values.getRangeScorer(leaf.reader(), "4", "40", false, false);
    assertEquals(-1, scorer.docID());
    assertEquals(0, scorer.nextDoc());
    assertEquals(DocIdSetIterator.NO_MORE_DOCS, scorer.nextDoc());
  }
 
  public void testEquals() throws Exception {
    Expression expr = JavascriptCompiler.compile("sqrt(a) + ln(b)");
View Full Code Here

    // just the first doc
    scorer = values.getRangeScorer(leaf.reader(), "4", "40", false, false);
    assertEquals(-1, scorer.docID());
    assertEquals(0, scorer.nextDoc());
    assertEquals(DocIdSetIterator.NO_MORE_DOCS, scorer.nextDoc());
  }
 
  public void testEquals() throws Exception {
    Expression expr = JavascriptCompiler.compile("sqrt(a) + ln(b)");
   
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.