this.addDocuments(
"{ \"aaa bbb\" : \"aaa ccc\" , \"ccc\" \"bbb ccc\" }",
"{ \"aaa\" : \"aaa bbb ddd\" }"
);
final Scorer scorer1 = this.getScorer(
ntq("aaa").getLuceneProxyQuery()
);
assertTrue(scorer1.nextDoc() != DocIdSetIterator.NO_MORE_DOCS);
assertEquals(0, scorer1.docID());
assertEquals(2, scorer1.freq(), 0);
assertTrue(scorer1.nextDoc() != DocIdSetIterator.NO_MORE_DOCS);
assertEquals(1, scorer1.docID());
assertEquals(2, scorer1.freq(), 0);
assertTrue(scorer1.nextDoc() == DocIdSetIterator.NO_MORE_DOCS);
final Scorer scorer2 = this.getScorer(
ntq("ccc").getLuceneProxyQuery()
);
assertTrue(scorer2.nextDoc() != DocIdSetIterator.NO_MORE_DOCS);
assertEquals(0, scorer2.docID());
assertEquals(3, scorer2.freq(), 0);
assertTrue(scorer2.nextDoc() == DocIdSetIterator.NO_MORE_DOCS);
final Scorer scorer3 = this.getScorer(
ntq("ddd").getLuceneProxyQuery()
);
assertTrue(scorer3.nextDoc() != DocIdSetIterator.NO_MORE_DOCS);
assertEquals(1, scorer3.docID());
assertEquals(1, scorer3.freq(), 0);
assertTrue(scorer3.nextDoc() == DocIdSetIterator.NO_MORE_DOCS);
}