You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dw...@apache.org on 2018/05/25 10:23:35 UTC
[3/3] lucene-solr:master: LUCENE-8333: Switch
MoreLikeThis.setMaxDocFreqPct to use maxDoc instead of numDoc
LUCENE-8333: Switch MoreLikeThis.setMaxDocFreqPct to use maxDoc instead of numDoc
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/7a5d9ca5
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/7a5d9ca5
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/7a5d9ca5
Branch: refs/heads/master
Commit: 7a5d9ca5e880425cea1d67035c6be0122ce8dd5b
Parents: 719fce8
Author: Dawid Weiss <dw...@apache.org>
Authored: Fri May 25 12:22:21 2018 +0200
Committer: Dawid Weiss <dw...@apache.org>
Committed: Fri May 25 12:22:21 2018 +0200
----------------------------------------------------------------------
lucene/CHANGES.txt | 3 +++
.../src/java/org/apache/lucene/queries/mlt/MoreLikeThis.java | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7a5d9ca5/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index d1f5395..b643af1 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -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)
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7a5d9ca5/lucene/queries/src/java/org/apache/lucene/queries/mlt/MoreLikeThis.java
----------------------------------------------------------------------
diff --git a/lucene/queries/src/java/org/apache/lucene/queries/mlt/MoreLikeThis.java b/lucene/queries/src/java/org/apache/lucene/queries/mlt/MoreLikeThis.java
index e145f74..8ea3933 100644
--- a/lucene/queries/src/java/org/apache/lucene/queries/mlt/MoreLikeThis.java
+++ b/lucene/queries/src/java/org/apache/lucene/queries/mlt/MoreLikeThis.java
@@ -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));
}
/**