dsmiley commented on PR #2221: URL: https://github.com/apache/solr/pull/2221#issuecomment-1913487230
I see what's happening. The `queryResultCache`'s `queryResultWindowSize` is forcing the actual number of documents to be raised from 0 to that window (which is 1 in this test config), thus we have to score docs to find the one best doc. I don't agree with your solution because it confuses what `useFilterCache` fundamentally means (use the filter cache for `q`). The other code path is actually already optimized for `rows==0` and no scores; it should be quite fast! I think the solution is to not save the results into `queryResultCache` when rows==0; thus the window won't be applied either. But I don't think SolrIndexSearcher should set this, I think it should be in QueryComponent by setting `NO_SET_QCACHE` so that some plugin/customization can easily make this decision for itself. Additionally, QueryComponent is setting `GET_SCORES` if `fl` contains the score but I think this should be further guarded by `rows != 0`. -- 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-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org