SOLR-4087: Add MAX_DOC_FREQ option to MoreLikeThis.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1414841 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2012-11-28 17:53:06 +00:00
parent 5543ee91ec
commit 672eeff8d2
3 changed files with 6 additions and 0 deletions

View File

@ -103,6 +103,9 @@ New Features
Example: foo AND {!term f=myfield v=$qq}
(yonik)
* SOLR-4087: Add MAX_DOC_FREQ option to MoreLikeThis.
(Andrew Janowczyk via Mark Miller)
Optimizations
----------------------

View File

@ -298,8 +298,10 @@ public class MoreLikeThisHandler extends RequestHandlerBase
mlt.setAnalyzer( searcher.getSchema().getAnalyzer() );
// configurable params
mlt.setMinTermFreq( params.getInt(MoreLikeThisParams.MIN_TERM_FREQ, MoreLikeThis.DEFAULT_MIN_TERM_FREQ));
mlt.setMinDocFreq( params.getInt(MoreLikeThisParams.MIN_DOC_FREQ, MoreLikeThis.DEFAULT_MIN_DOC_FREQ));
mlt.setMaxDocFreq( params.getInt(MoreLikeThisParams.MAX_DOC_FREQ, MoreLikeThis.DEFAULT_MAX_DOC_FREQ));
mlt.setMinWordLen( params.getInt(MoreLikeThisParams.MIN_WORD_LEN, MoreLikeThis.DEFAULT_MIN_WORD_LENGTH));
mlt.setMaxWordLen( params.getInt(MoreLikeThisParams.MAX_WORD_LEN, MoreLikeThis.DEFAULT_MAX_WORD_LENGTH));
mlt.setMaxQueryTerms( params.getInt(MoreLikeThisParams.MAX_QUERY_TERMS, MoreLikeThis.DEFAULT_MAX_QUERY_TERMS));

View File

@ -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 MIN_DOC_FREQ = PREFIX + "mindf";
public final static String MIN_WORD_LEN = PREFIX + "minwl";
public final static String MAX_WORD_LEN = PREFIX + "maxwl";