lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [45/50] [abbrv] lucene-solr:jira/solr-11072: LUCENE-7991: KNearestNeighborDocumentClassifier.knnSearch no longer applies a previous boosted field's factor to subsequent unboosted fields.
Date Thu, 19 Oct 2017 08:31:33 GMT
LUCENE-7991: KNearestNeighborDocumentClassifier.knnSearch no longer applies a previous boosted
field's factor to subsequent unboosted fields.


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

Branch: refs/heads/jira/solr-11072
Commit: 6aa312a8db194771ee49922907d2b534728688cb
Parents: a6f8dd7
Author: Christine Poerschke <cpoerschke@apache.org>
Authored: Wed Oct 18 13:18:40 2017 +0100
Committer: Christine Poerschke <cpoerschke@apache.org>
Committed: Wed Oct 18 13:18:40 2017 +0100

----------------------------------------------------------------------
 lucene/CHANGES.txt                                            | 7 ++++++-
 .../document/KNearestNeighborDocumentClassifier.java          | 1 +
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6aa312a8/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 02d25d1..7f90a7e 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -14,7 +14,12 @@ Changes in Runtime Behavior
 
 
 ======================= Lucene 7.2.0 =======================
-(No Changes)
+
+Bug Fixes
+
+* LUCENE-7991: KNearestNeighborDocumentClassifier.knnSearch no longer applies
+  a previous boosted field's factor to subsequent unboosted fields.
+  (Christine Poerschke)
 
 ======================= Lucene 7.1.0 =======================
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6aa312a8/lucene/classification/src/java/org/apache/lucene/classification/document/KNearestNeighborDocumentClassifier.java
----------------------------------------------------------------------
diff --git a/lucene/classification/src/java/org/apache/lucene/classification/document/KNearestNeighborDocumentClassifier.java
b/lucene/classification/src/java/org/apache/lucene/classification/document/KNearestNeighborDocumentClassifier.java
index 88d41fc..d687722 100644
--- a/lucene/classification/src/java/org/apache/lucene/classification/document/KNearestNeighborDocumentClassifier.java
+++ b/lucene/classification/src/java/org/apache/lucene/classification/document/KNearestNeighborDocumentClassifier.java
@@ -129,6 +129,7 @@ public class KNearestNeighborDocumentClassifier extends KNearestNeighborClassifi
       for (String fieldContent : fieldValues) {
         mltQuery.add(new BooleanClause(mlt.like(fieldName, new StringReader(fieldContent)),
BooleanClause.Occur.SHOULD));
       }
+      mlt.setBoostFactor(1);// restore neutral boost for next field
     }
     Query classFieldQuery = new WildcardQuery(new Term(classFieldName, "*"));
     mltQuery.add(new BooleanClause(classFieldQuery, BooleanClause.Occur.MUST));


Mime
View raw message