heng-kuang-777 opened a new pull request, #18006: URL: https://github.com/apache/pinot/pull/18006
### Summary In `TextMatchFilterOperator.getSearchableDocCount()`, the condition `searchableDocCount > 0` caused a fallback to `numDocs` when the Lucene searcher had 0 visible documents. This can occur on a newly created consuming segment before the first Lucene SearcherManager refresh has completed. This made NOT TEXT_MATCH invert over the full `[0, numDocs)` range, producing false positives for all tail documents. Fix by changing the guard to `searchableDocCount >= 0`, so a zero searchable count is respected and NOT results are correctly empty. This is a follow up to https://github.com/apache/pinot/pull/17880 ### Test Plan Added a unit test to validate searchableDocCount can be returned even when it's 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: [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]
