LUCENE-2880: Relax assertion: span near and phrase queries don't have the same scores if they wrap twice the same term.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1686337 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Adrien Grand 2015-06-18 22:40:59 +00:00
parent 9f8635de07
commit 982a965832
1 changed files with 5 additions and 1 deletions

View File

@ -154,7 +154,11 @@ public class TestSpanSearchEquivalence extends SearchEquivalenceTestBase {
};
SpanQuery q1 = spanQuery(new SpanNearQuery(subquery, 0, true));
PhraseQuery q2 = new PhraseQuery(t1.field(), t1.bytes(), t2.bytes());
assertSameScores(q1, q2);
if (t1.equals(t2)) {
assertSameSet(q1, q2);
} else {
assertSameScores(q1, q2);
}
}
/** SpanNearQuery([A, B], ∞, false) = +A +B */