gsmiller opened a new pull request #261: URL: https://github.com/apache/lucene/pull/261
# Description We need to ensure `DrillSidewaysQuery` instances never get cached. The process of caching the results ignores deleted docs (`null` `acceptDocs` passed to the `BulkScorer`). This is an issue with `DrillSidewaysScorer` since it has the (intentional) side-effect of populating the "sideways" `FacetsCollector` instances, which means it will included deleted docs in the sideways counts. # Solution `DrillSidewaysQuery#isCacheable` advertises as never cacheable by returning `false`. Note that I also removed the older hack in `DrillSideways` that's no longer needed with this solution. # Tests Added a new test that repro's the caching bug with both a `CollectorManager` and `Collector` execution path. Confirmed the test now passes. # Checklist Please review the following and check all that apply: - [x] I have reviewed the guidelines for [How to Contribute](https://wiki.apache.org/lucene/HowToContribute) and my code conforms to the standards described there to the best of my ability. - [x] I have created a Jira issue and added the issue ID to my pull request title. - [x] I have given Lucene maintainers [access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork) to contribute to my PR branch. (optional but recommended) - [x] I have developed this patch against the `main` branch. - [x] I have run `./gradlew check`. - [x] I have added tests for my changes. -- 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...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org