mirror of https://github.com/apache/lucene.git
LUCENE-7991: KNearestNeighborDocumentClassifier.knnSearch no longer applies a previous boosted field's factor to subsequent unboosted fields.
This commit is contained in:
parent
a6f8dd74f0
commit
6aa312a8db
|
@ -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 =======================
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue