SOLR-7639: Fixing maxqt, and maxntp, and adding support for maxdf to MLTQParser

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1687088 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Anshum Gupta 2015-06-23 16:03:48 +00:00
parent e39473a5a3
commit 48ea578733
2 changed files with 12 additions and 4 deletions

View File

@ -72,10 +72,14 @@ public class CloudMLTQParser extends QParser {
mlt.setMaxWordLen(localParams.getInt("maxwl"));
if(localParams.get("maxqt") != null)
mlt.setMaxWordLen(localParams.getInt("maxqt"));
mlt.setMaxQueryTerms(localParams.getInt("maxqt"));
if(localParams.get("maxntp") != null)
mlt.setMaxWordLen(localParams.getInt("maxntp"));
mlt.setMaxNumTokensParsed(localParams.getInt("maxntp"));
if(localParams.get("maxdf") != null) {
mlt.setMaxDocFreq(localParams.getInt("maxdf"));
}
mlt.setAnalyzer(req.getSchema().getIndexAnalyzer());

View File

@ -73,10 +73,14 @@ public class SimpleMLTQParser extends QParser {
mlt.setMaxWordLen(localParams.getInt("maxwl"));
if(localParams.get("maxqt") != null)
mlt.setMaxWordLen(localParams.getInt("maxqt"));
mlt.setMaxQueryTerms(localParams.getInt("maxqt"));
if(localParams.get("maxntp") != null)
mlt.setMaxWordLen(localParams.getInt("maxntp"));
mlt.setMaxNumTokensParsed(localParams.getInt("maxntp"));
if(localParams.get("maxdf") != null) {
mlt.setMaxDocFreq(localParams.getInt("maxdf"));
}
ArrayList<String> fields = new ArrayList();