mirror of https://github.com/apache/lucene.git
SOLR-9546: reverted some changes
This commit is contained in:
parent
ccbafdc403
commit
49ca9cea72
|
@ -69,16 +69,29 @@ public class CloudMLTQParser extends QParser {
|
||||||
Map<String,Float> boostFields = new HashMap<>();
|
Map<String,Float> boostFields = new HashMap<>();
|
||||||
MoreLikeThis mlt = new MoreLikeThis(req.getSearcher().getIndexReader());
|
MoreLikeThis mlt = new MoreLikeThis(req.getSearcher().getIndexReader());
|
||||||
|
|
||||||
mlt.setMinTermFreq(localParams.getInt("mintf", MoreLikeThis.DEFAULT_MIN_TERM_FREQ));
|
if(localParams.getInt("mintf") != null)
|
||||||
mlt.setMinDocFreq(localParams.getInt("mindf", MoreLikeThis.DEFAULT_MIN_DOC_FREQ));
|
mlt.setMinTermFreq(localParams.getInt("mintf"));
|
||||||
mlt.setMinWordLen(localParams.getInt("minwl", MoreLikeThis.DEFAULT_MIN_WORD_LENGTH));
|
|
||||||
mlt.setMaxWordLen(localParams.getInt("maxwl", MoreLikeThis.DEFAULT_MIN_WORD_LENGTH));
|
mlt.setMinDocFreq(localParams.getInt("mindf", 0));
|
||||||
mlt.setMaxQueryTerms(localParams.getInt("maxqt",MoreLikeThis.DEFAULT_MAX_QUERY_TERMS));
|
|
||||||
mlt.setMaxNumTokensParsed(localParams.getInt("maxntp",MoreLikeThis.DEFAULT_MAX_NUM_TOKENS_PARSED));
|
if(localParams.get("minwl") != null)
|
||||||
mlt.setMaxDocFreq(localParams.getInt("maxdf", MoreLikeThis.DEFAULT_MAX_DOC_FREQ));
|
mlt.setMinWordLen(localParams.getInt("minwl"));
|
||||||
|
|
||||||
|
if(localParams.get("maxwl") != null)
|
||||||
|
mlt.setMaxWordLen(localParams.getInt("maxwl"));
|
||||||
|
|
||||||
|
if(localParams.get("maxqt") != null)
|
||||||
|
mlt.setMaxQueryTerms(localParams.getInt("maxqt"));
|
||||||
|
|
||||||
|
if(localParams.get("maxntp") != null)
|
||||||
|
mlt.setMaxNumTokensParsed(localParams.getInt("maxntp"));
|
||||||
|
|
||||||
|
if(localParams.get("maxdf") != null) {
|
||||||
|
mlt.setMaxDocFreq(localParams.getInt("maxdf"));
|
||||||
|
}
|
||||||
|
|
||||||
if(localParams.get("boost") != null) {
|
if(localParams.get("boost") != null) {
|
||||||
mlt.setBoost(localParams.getBool("boost", false));
|
mlt.setBoost(localParams.getBool("boost"));
|
||||||
boostFields = SolrPluginUtils.parseFieldBoosts(qf);
|
boostFields = SolrPluginUtils.parseFieldBoosts(qf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue