lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jim...@apache.org
Subject lucene-solr:master: LUCENE-8121: Fix span terms frequency to return the freq of the entire spans (not the frequency of the term within the span).
Date Thu, 11 Jan 2018 11:46:15 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/master 75d50b449 -> fd7aea5be


LUCENE-8121: Fix span terms frequency to return the freq of the entire spans (not the frequency
of the term within the span).


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/fd7aea5b
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/fd7aea5b
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/fd7aea5b

Branch: refs/heads/master
Commit: fd7aea5bedba349261bae08b423504e76433bb17
Parents: 75d50b4
Author: Jim Ferenczi <jimczi@apache.org>
Authored: Thu Jan 11 12:45:20 2018 +0100
Committer: Jim Ferenczi <jimczi@apache.org>
Committed: Thu Jan 11 12:45:20 2018 +0100

----------------------------------------------------------------------
 .../java/org/apache/lucene/search/uhighlight/PhraseHelper.java   | 2 +-
 .../search/uhighlight/TestUnifiedHighlighterStrictPhrases.java   | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/fd7aea5b/lucene/highlighter/src/java/org/apache/lucene/search/uhighlight/PhraseHelper.java
----------------------------------------------------------------------
diff --git a/lucene/highlighter/src/java/org/apache/lucene/search/uhighlight/PhraseHelper.java
b/lucene/highlighter/src/java/org/apache/lucene/search/uhighlight/PhraseHelper.java
index f5205e4..2edb192 100644
--- a/lucene/highlighter/src/java/org/apache/lucene/search/uhighlight/PhraseHelper.java
+++ b/lucene/highlighter/src/java/org/apache/lucene/search/uhighlight/PhraseHelper.java
@@ -400,7 +400,7 @@ public class PhraseHelper {
 
     @Override
     public int freq() throws IOException {
-      return startOffsets.length;
+      return numPairs;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/fd7aea5b/lucene/highlighter/src/test/org/apache/lucene/search/uhighlight/TestUnifiedHighlighterStrictPhrases.java
----------------------------------------------------------------------
diff --git a/lucene/highlighter/src/test/org/apache/lucene/search/uhighlight/TestUnifiedHighlighterStrictPhrases.java
b/lucene/highlighter/src/test/org/apache/lucene/search/uhighlight/TestUnifiedHighlighterStrictPhrases.java
index 9892b83..08820aa 100644
--- a/lucene/highlighter/src/test/org/apache/lucene/search/uhighlight/TestUnifiedHighlighterStrictPhrases.java
+++ b/lucene/highlighter/src/test/org/apache/lucene/search/uhighlight/TestUnifiedHighlighterStrictPhrases.java
@@ -163,7 +163,7 @@ public class TestUnifiedHighlighterStrictPhrases extends LuceneTestCase
{
         return Arrays.toString(passages);
       }
     });
-    assertArrayEquals(new String[]{"[Passage[0-22]{yin[0-3],yang[4-8],yin[10-13]}score=2.0685003]"},
+    assertArrayEquals(new String[]{"[Passage[0-22]{yin[0-3],yang[4-8],yin[10-13]}score=2.4964213]"},
         highlighter.highlight("body", query, topDocs));
   }
 
@@ -207,7 +207,7 @@ public class TestUnifiedHighlighterStrictPhrases extends LuceneTestCase
{
         return Arrays.toString(passages);
       }
     });
-    assertArrayEquals(new String[]{"[Passage[0-41]{alpha[0-5],bravo[6-11],charlie[12-19]}score=2.723861]"},
+    assertArrayEquals(new String[]{"[Passage[0-41]{alpha[0-5],bravo[6-11],charlie[12-19]}score=3.931102]"},
         highlighter.highlight("body", query, topDocs));
   }
 


Mime
View raw message