public virtual void  TestEmptyBucketWithMoreDocs()
        {
            // This test checks the logic of nextDoc() when all sub scorers have docs
            // beyond the first bucket (for example). Currently, the code relies on the
            // 'more' variable to work properly, and this test ensures that if the logic
            // changes, we have a test to back it up.

            Similarity sim = Similarity.GetDefault();

            Scorer[]      scorers = new Scorer[] { new AnonymousClassScorer(this, sim) };
            BooleanScorer bs      = new BooleanScorer(sim, 1, new System.Collections.ArrayList(scorers), null);

            Assert.AreEqual(3000, bs.NextDoc(), "should have received 3000");
            Assert.AreEqual(DocIdSetIterator.NO_MORE_DOCS, bs.NextDoc(), "should have received NO_MORE_DOCS");
        }
Exemple #2
0
 private void  InitBlock()
 {
     similarity = Similarity.GetDefault();
 }
 static BooleanScorer2()
 {
     defaultSimilarity = Similarity.GetDefault();
 }