Use XConstantScoreQuery instead of ConstantScoreQuery.
Relates to #3167
This commit is contained in:
parent
aa851225e5
commit
96af4ee44f
|
@ -20,12 +20,12 @@
|
||||||
package org.elasticsearch.index.query;
|
package org.elasticsearch.index.query;
|
||||||
|
|
||||||
import org.apache.lucene.index.AtomicReaderContext;
|
import org.apache.lucene.index.AtomicReaderContext;
|
||||||
import org.apache.lucene.search.ConstantScoreQuery;
|
|
||||||
import org.apache.lucene.search.Explanation;
|
import org.apache.lucene.search.Explanation;
|
||||||
import org.apache.lucene.search.Filter;
|
import org.apache.lucene.search.Filter;
|
||||||
import org.apache.lucene.search.Query;
|
import org.apache.lucene.search.Query;
|
||||||
import org.elasticsearch.common.Strings;
|
import org.elasticsearch.common.Strings;
|
||||||
import org.elasticsearch.common.inject.Inject;
|
import org.elasticsearch.common.inject.Inject;
|
||||||
|
import org.elasticsearch.common.lucene.search.XConstantScoreQuery;
|
||||||
import org.elasticsearch.common.lucene.search.function.FunctionScoreQuery;
|
import org.elasticsearch.common.lucene.search.function.FunctionScoreQuery;
|
||||||
import org.elasticsearch.common.lucene.search.function.ScoreFunction;
|
import org.elasticsearch.common.lucene.search.function.ScoreFunction;
|
||||||
import org.elasticsearch.common.xcontent.XContentParser;
|
import org.elasticsearch.common.xcontent.XContentParser;
|
||||||
|
@ -101,7 +101,7 @@ public class CustomScoreQueryParser implements QueryParser {
|
||||||
if (query == null && filter == null) {
|
if (query == null && filter == null) {
|
||||||
return null;
|
return null;
|
||||||
} else if (filter != null) {
|
} else if (filter != null) {
|
||||||
query = new ConstantScoreQuery(filter);
|
query = new XConstantScoreQuery(filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
SearchScript searchScript;
|
SearchScript searchScript;
|
||||||
|
|
Loading…
Reference in New Issue