You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2022/05/06 22:03:28 UTC

[GitHub] [solr] mkhludnev commented on a diff in pull request #814: SOLR-16162: FilterQuery should implement DocSetProducer

mkhludnev commented on code in PR #814:
URL: https://github.com/apache/solr/pull/814#discussion_r867240926


##########
solr/core/src/java/org/apache/solr/query/FilterQuery.java:
##########
@@ -125,11 +126,24 @@ public Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float bo
       return new ConstantScoreQuery(q).createWeight(searcher, scoreMode, 0f);
     }
 
-    SolrIndexSearcher solrSearcher = (SolrIndexSearcher) searcher;
-    DocSet docs = solrSearcher.getDocSet(q);
+    DocSet docs = createDocSet((SolrIndexSearcher) searcher);
     // reqInfo.addCloseHook(docs);  // needed for off-heap refcounting
 
     // note: DocSet.makeQuery is basically a CSQ
     return docs.makeQuery().createWeight(searcher, scoreMode, 0f);
   }
+
+  @Override
+  public DocSet createDocSet(SolrIndexSearcher searcher) throws IOException {
+    /*
+    There is a substantial practical reason for FilterQuery to implement DocSetProducer:

Review Comment:
   Well, you know, it might not be a good idea to open this can of worms. 
   There's `org.apache.solr.search.SolrIndexSearcher#getDocSetNC`, where NC implies NOcache, I suppose. That method hits  org.apache.solr.search.DocSetUtil#createDocSet(), which checks for `DocSetProducer`. I'm not sure if reaching filtercache here is what `getDocSetNC` is plan to do. 



-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org