lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpou...@apache.org
Subject svn commit: r1686339 - in /lucene/dev/branches/branch_5x: ./ lucene/ lucene/core/ lucene/core/src/test/org/apache/lucene/search/spans/TestSpanSearchEquivalence.java
Date Thu, 18 Jun 2015 22:41:43 GMT
Author: jpountz
Date: Thu Jun 18 22:41:43 2015
New Revision: 1686339

URL: http://svn.apache.org/r1686339
Log:
LUCENE-2880: Relax assertion: span near and phrase queries don't have the same scores if they
wrap twice the same term.

Modified:
    lucene/dev/branches/branch_5x/   (props changed)
    lucene/dev/branches/branch_5x/lucene/   (props changed)
    lucene/dev/branches/branch_5x/lucene/core/   (props changed)
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/spans/TestSpanSearchEquivalence.java

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/spans/TestSpanSearchEquivalence.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/spans/TestSpanSearchEquivalence.java?rev=1686339&r1=1686338&r2=1686339&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/spans/TestSpanSearchEquivalence.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/spans/TestSpanSearchEquivalence.java
Thu Jun 18 22:41:43 2015
@@ -156,7 +156,11 @@ public class TestSpanSearchEquivalence e
     PhraseQuery q2 = new PhraseQuery();
     q2.add(t1);
     q2.add(t2);
-    assertSameScores(q1, q2);
+    if (t1.equals(t2)) {
+      assertSameSet(q1, q2);
+    } else {
+      assertSameScores(q1, q2);
+    }
   }
   
   /** SpanNearQuery([A, B], ∞, false) = +A +B */



Mime
View raw message