File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
server/src/main/java/org/elasticsearch/lucene/similarity Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ public final class LegacyBM25Similarity extends Similarity {
43
43
* </ul>
44
44
*/
45
45
public LegacyBM25Similarity () {
46
- this . bm25Similarity = new BM25Similarity ();
46
+ this ( new BM25Similarity () );
47
47
}
48
48
49
49
/**
@@ -54,7 +54,12 @@ public LegacyBM25Similarity() {
54
54
* not within the range {@code [0..1]}
55
55
*/
56
56
public LegacyBM25Similarity (float k1 , float b , boolean discountOverlaps ) {
57
- this .bm25Similarity = new BM25Similarity (k1 , b , discountOverlaps );
57
+ this (new BM25Similarity (k1 , b , discountOverlaps ));
58
+ }
59
+
60
+ private LegacyBM25Similarity (BM25Similarity bm25Similarity ) {
61
+ super (bm25Similarity .getDiscountOverlaps ());
62
+ this .bm25Similarity = bm25Similarity ;
58
63
}
59
64
60
65
@ Override
You can’t perform that action at this time.
0 commit comments