mirror of https://github.com/apache/lucene.git
LUCENE-8333: Switch MoreLikeThis.setMaxDocFreqPct to use maxDoc instead of numDoc
This commit is contained in:
parent
719fce8026
commit
7a5d9ca5e8
|
@ -49,6 +49,9 @@ API Changes
|
|||
|
||||
Changes in Runtime Behavior
|
||||
|
||||
* LUCENE-8333: Switch MoreLikeThis.setMaxDocFreqPct to use maxDoc instead of
|
||||
numDocs. (Robert Muir, Dawid Weiss).
|
||||
|
||||
* LUCENE-7837: Indices that were created before the previous major version
|
||||
will now fail to open even if they have been merged with the previous major
|
||||
version. (Adrien Grand)
|
||||
|
|
|
@ -425,7 +425,7 @@ public final class MoreLikeThis {
|
|||
* in to be still considered relevant.
|
||||
*/
|
||||
public void setMaxDocFreqPct(int maxPercentage) {
|
||||
setMaxDocFreq(Math.toIntExact((long) maxPercentage * ir.numDocs() / 100));
|
||||
setMaxDocFreq(Math.toIntExact((long) maxPercentage * ir.maxDoc() / 100));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue