final int maxNumFragmentsRequired = 2;
assertExpectedHighlightCount(maxNumFragmentsRequired, 6);
}
public void testSpanMultiPhraseQueryHighlightingWithGap() throws Exception {
MultiPhraseQuery mpq = new MultiPhraseQuery();
/*
* The toString of MultiPhraseQuery doesn't work so well with these
* out-of-order additions, but the Query itself seems to match accurately.
*/
mpq.add(new Term[] { new Term(FIELD_NAME, "wordz") }, 2);
mpq.add(new Term[] { new Term(FIELD_NAME, "wordx") }, 0);
doSearching(mpq);
final int maxNumFragmentsRequired = 1;
final int expectedHighlights = 2;