mirror of https://github.com/apache/lucene.git
SOLR-10849: MoreLikeThisComponent should expose setMaxDocFreqPct (maxDoc frequency percentage).
This commit is contained in:
parent
661a3c46d4
commit
b2ea95c9ec
|
@ -284,6 +284,9 @@ Upgrade Notes
|
|||
New Features
|
||||
----------------------
|
||||
|
||||
* SOLR-10849: MoreLikeThisComponent should expose setMaxDocFreqPct (maxDoc
|
||||
frequency percentage). (Dawid Weiss)
|
||||
|
||||
* SOLR-10307: Allow Passing SSL passwords through environment variables. (Mano Kovacs via Mark Miller)
|
||||
|
||||
* SOLR-10721: Provide a way to know when Core Discovery is finished and when all async cores are done loading
|
||||
|
|
|
@ -335,6 +335,13 @@ public class MoreLikeThisHandler extends RequestHandlerBase
|
|||
mlt.setMaxQueryTerms( params.getInt(MoreLikeThisParams.MAX_QUERY_TERMS, MoreLikeThis.DEFAULT_MAX_QUERY_TERMS));
|
||||
mlt.setMaxNumTokensParsed(params.getInt(MoreLikeThisParams.MAX_NUM_TOKENS_PARSED, MoreLikeThis.DEFAULT_MAX_NUM_TOKENS_PARSED));
|
||||
mlt.setBoost( params.getBool(MoreLikeThisParams.BOOST, false ) );
|
||||
|
||||
// There is no default for maxDocFreqPct. Also, it's a bit oddly expressed as an integer value
|
||||
// (percentage of the collection's documents count). We keep Lucene's convention here.
|
||||
if (params.getInt(MoreLikeThisParams.MAX_DOC_FREQ_PCT) != null) {
|
||||
mlt.setMaxDocFreqPct(params.getInt(MoreLikeThisParams.MAX_DOC_FREQ_PCT));
|
||||
}
|
||||
|
||||
boostFields = SolrPluginUtils.parseFieldBoosts(params.getParams(MoreLikeThisParams.QF));
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ public interface MoreLikeThisParams
|
|||
public final static String SIMILARITY_FIELDS = PREFIX + "fl";
|
||||
public final static String MIN_TERM_FREQ = PREFIX + "mintf";
|
||||
public final static String MAX_DOC_FREQ = PREFIX + "maxdf";
|
||||
public final static String MAX_DOC_FREQ_PCT = PREFIX + "maxdfpct";
|
||||
public final static String MIN_DOC_FREQ = PREFIX + "mindf";
|
||||
public final static String MIN_WORD_LEN = PREFIX + "minwl";
|
||||
public final static String MAX_WORD_LEN = PREFIX + "maxwl";
|
||||
|
|
Loading…
Reference in New Issue