dsmiley commented on code in PR #1184:
URL: https://github.com/apache/solr/pull/1184#discussion_r1026647448
##########
solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java:
##########
@@ -1211,17 +1211,22 @@ public ProcessedFilter getProcessedFilter(DocSet
setFilter, List<Query> queries)
}
// Are all of our normal cached filters negative?
- if (end > 0 && answer == null) {
- answer = getLiveDocSet();
- }
+ if (end > 0) {
Review Comment:
As I said, I think we shouldn't do this if equals to 1 since there will be
at most one copy any way (sometimes optimizations lead to none). Furthermore,
consider that "answer" may be a SortedIntDocSet and thus upgrading it to a
BitSet may be wasteful.
##########
solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java:
##########
@@ -1211,17 +1211,22 @@ public ProcessedFilter getProcessedFilter(DocSet
setFilter, List<Query> queries)
}
// Are all of our normal cached filters negative?
- if (end > 0 && answer == null) {
- answer = getLiveDocSet();
- }
+ if (end > 0) {
Review Comment:
Come to think of it, if "answer" is an instance of SortedIntDocSet, let's
not do this optimization at all; right?
##########
solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java:
##########
@@ -1211,17 +1211,22 @@ public ProcessedFilter getProcessedFilter(DocSet
setFilter, List<Query> queries)
}
// Are all of our normal cached filters negative?
- if (end > 0 && answer == null) {
- answer = getLiveDocSet();
- }
+ if (end > 0) {
Review Comment:
Also, iff smallestIdx is >= 0 then "end" is effectively one smaller for the
purposes of this check.
--
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]