From 96af4ee44f2a0865b039d78dc2b7943f331f493d Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Thu, 13 Jun 2013 10:00:36 +0200 Subject: [PATCH] Use XConstantScoreQuery instead of ConstantScoreQuery. Relates to #3167 --- .../org/elasticsearch/index/query/CustomScoreQueryParser.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/elasticsearch/index/query/CustomScoreQueryParser.java b/src/main/java/org/elasticsearch/index/query/CustomScoreQueryParser.java index ca0dda21670..97675d12130 100644 --- a/src/main/java/org/elasticsearch/index/query/CustomScoreQueryParser.java +++ b/src/main/java/org/elasticsearch/index/query/CustomScoreQueryParser.java @@ -20,12 +20,12 @@ package org.elasticsearch.index.query; import org.apache.lucene.index.AtomicReaderContext; -import org.apache.lucene.search.ConstantScoreQuery; import org.apache.lucene.search.Explanation; import org.apache.lucene.search.Filter; import org.apache.lucene.search.Query; import org.elasticsearch.common.Strings; 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.ScoreFunction; import org.elasticsearch.common.xcontent.XContentParser; @@ -101,7 +101,7 @@ public class CustomScoreQueryParser implements QueryParser { if (query == null && filter == null) { return null; } else if (filter != null) { - query = new ConstantScoreQuery(filter); + query = new XConstantScoreQuery(filter); } SearchScript searchScript;