LUCENE-8591: add LegacyBM25Similarity#getDiscountOverlaps

Signed-off-by: Adrien Grand <jpountz@gmail.com>
This commit is contained in:
Luca Cavanna 2018-12-05 16:08:13 +01:00 committed by Adrien Grand
parent f0db05b37e
commit b24af10d59
1 changed files with 8 additions and 0 deletions

View File

@ -89,6 +89,14 @@ public final class LegacyBM25Similarity extends Similarity {
bm25Similarity.setDiscountOverlaps(v);
}
/**
* Returns true if overlap tokens are discounted from the document's length.
* @see #setDiscountOverlaps
*/
public boolean getDiscountOverlaps() {
return bm25Similarity.getDiscountOverlaps();
}
@Override
public String toString() {
return bm25Similarity.toString();