Kulieshova opened a new issue, #15020: URL: https://github.com/apache/lucene/issues/15020
### Description ### Problem In Lucene 9.11, the `searchLeaf()` method in `AbstractKnnVectorQuery` is declared `private`, preventing custom subclasses from overriding the search execution logic. This restricts the ability to build custom instrumentation or extend search behaviors. Our team at Uber is working on improving visibility and control over KNN query execution in a fork of Lucene 9.11. We developed functionality to track exact vs. approximate search usage and fallback patterns, which is currently impossible to get from Lucene itself. To enable this, we created a subclass of `KnnFloatVectorQuery` that overrides `searchLeaf()` to route execution through custom logic. However, due to the method’s `private` access modifier in 9.11, this override is not possible without modifying the core Lucene code. While we currently use a custom jar with the modified access for testing, we cannot safely ship this setup to production or rely on it long-term. ### Solution Change the access modifier of `searchLeaf()` method from private to public in Lucene 9.11, as already implemented in [commit d279af1](https://github.com/apache/lucene/commit/d279af1961f40465a3a9e8ab84848afe69fd8424) on the main branch. This change is already upstream and therefore changing it with this PR presents minimal logic changes and maintains full backward compatibility with all existing usages. -- 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.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