mirror of https://github.com/apache/lucene.git
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:
parent
5003628c65
commit
b4c04ddbc8
|
@ -27,6 +27,7 @@ import org.apache.lucene.search.Weight;
|
||||||
import org.apache.lucene.util.ToStringUtils;
|
import org.apache.lucene.util.ToStringUtils;
|
||||||
import org.apache.solr.search.DocSet;
|
import org.apache.solr.search.DocSet;
|
||||||
import org.apache.solr.search.ExtendedQueryBase;
|
import org.apache.solr.search.ExtendedQueryBase;
|
||||||
|
import org.apache.solr.search.SolrConstantScoreQuery;
|
||||||
import org.apache.solr.search.SolrIndexSearcher;
|
import org.apache.solr.search.SolrIndexSearcher;
|
||||||
|
|
||||||
public class FilterQuery extends ExtendedQueryBase {
|
public class FilterQuery extends ExtendedQueryBase {
|
||||||
|
@ -91,7 +92,7 @@ public class FilterQuery extends ExtendedQueryBase {
|
||||||
DocSet docs = solrSearcher.getDocSet(q);
|
DocSet docs = solrSearcher.getDocSet(q);
|
||||||
// reqInfo.addCloseHook(docs); // needed for off-heap refcounting
|
// reqInfo.addCloseHook(docs); // needed for off-heap refcounting
|
||||||
|
|
||||||
ConstantScoreQuery csq = new ConstantScoreQuery( docs.getTopFilter() );
|
SolrConstantScoreQuery csq = new SolrConstantScoreQuery( docs.getTopFilter() );
|
||||||
csq.setBoost( this.getBoost() );
|
csq.setBoost( this.getBoost() );
|
||||||
return csq.createWeight(searcher, needScores);
|
return csq.createWeight(searcher, needScores);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue