dsmiley commented on a change in pull request #529:
URL: https://github.com/apache/solr/pull/529#discussion_r799808853



##########
File path: solr/core/src/java/org/apache/solr/search/FunctionRangeQuery.java
##########
@@ -36,12 +36,11 @@
 
   final ValueSourceRangeFilter rangeFilt;
   boolean cache = true; // cache by default

Review comment:
       `cache` can now be removed I think?

##########
File path: solr/core/src/java/org/apache/solr/query/FilterQuery.java
##########
@@ -89,13 +87,13 @@ public Weight createWeight(IndexSearcher searcher, 
ScoreMode scoreMode, float bo
 
     if (!(searcher instanceof SolrIndexSearcher)) {
       // delete-by-query won't have SolrIndexSearcher
-      return new BoostQuery(new ConstantScoreQuery(q), 
0).createWeight(searcher, scoreMode, 1f);
+      return new ConstantScoreQuery(q).createWeight(searcher, scoreMode, 1f);

Review comment:
       It's fine to roll in SOLR-14800 scope as well; yeah let's do that.
   
   This line can be `return new ConstantScoreWeight(q, 1f);`

##########
File path: solr/core/src/java/org/apache/solr/query/FilterQuery.java
##########
@@ -89,13 +87,13 @@ public Weight createWeight(IndexSearcher searcher, 
ScoreMode scoreMode, float bo
 
     if (!(searcher instanceof SolrIndexSearcher)) {
       // delete-by-query won't have SolrIndexSearcher
-      return new BoostQuery(new ConstantScoreQuery(q), 
0).createWeight(searcher, scoreMode, 1f);
+      return new ConstantScoreQuery(q).createWeight(searcher, scoreMode, 1f);
     }
 
     SolrIndexSearcher solrSearcher = (SolrIndexSearcher)searcher;
     DocSet docs = solrSearcher.getDocSet(q);
     // reqInfo.addCloseHook(docs);  // needed for off-heap refcounting
 
-    return new BoostQuery(new SolrConstantScoreQuery(docs.getTopFilter()), 
0).createWeight(searcher, scoreMode, 1f);
+    return docs.makeQuery().createWeight(searcher, scoreMode, 1f);

Review comment:
       The call to `solrSearcher.getDocSet(q)` is the point of all this -- 
which is cached.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to