SOLR-7219: use SolrConstantScoreQuery to fix 5x filter() break

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1695133 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2015-08-10 16:45:23 +00:00
parent 5003628c65
commit b4c04ddbc8
1 changed files with 2 additions and 1 deletions

View File

@ -27,6 +27,7 @@ import org.apache.lucene.search.Weight;
import org.apache.lucene.util.ToStringUtils;
import org.apache.solr.search.DocSet;
import org.apache.solr.search.ExtendedQueryBase;
import org.apache.solr.search.SolrConstantScoreQuery;
import org.apache.solr.search.SolrIndexSearcher;
public class FilterQuery extends ExtendedQueryBase {
@ -91,7 +92,7 @@ public class FilterQuery extends ExtendedQueryBase {
DocSet docs = solrSearcher.getDocSet(q);
// reqInfo.addCloseHook(docs); // needed for off-heap refcounting
ConstantScoreQuery csq = new ConstantScoreQuery( docs.getTopFilter() );
SolrConstantScoreQuery csq = new SolrConstantScoreQuery( docs.getTopFilter() );
csq.setBoost( this.getBoost() );
return csq.createWeight(searcher, needScores);
}