xande opened a new pull request, #16783: URL: https://github.com/apache/lucene/pull/16783
### Description `DirectoryTaxonomyReader#getBulkOrdinals` has an early return for the case where every requested label is already in the ordinal cache, but that early return never triggered. The condition for early return checks `indexesMissingFromCache.length == 0`, which is the capacity of the miss array (`Math.min(10, categoryPaths.length)`), not the number of misses. Calls with fewer than two labels return before this point, so the capacity here is always at least 2. As a result, a fully cached call still sorts an empty array and creates a `TermsEnum` over all taxonomy segments. The returned ordinals were always correct, it it just an optimization. -- 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]
