DivyanshIITB opened a new pull request, #14370: URL: https://github.com/apache/lucene/pull/14370
This PR introduces leafReaders() in IndexReader for direct access to LeafReader instances, improving usability over leaves(). A corresponding unit test ensures correctness by validating retrieval consistency and resource management. - Provides a convenient way to access leaf readers without manually iterating over leaves(). - Enhances code readability and usability for developers working with Lucene’s indexing system. - Ensures functionality is tested to prevent regressions. Testing & Validation: ✅ Successfully retrieves LeafReader instances. ✅ Ensures the size matches reader.leaves().size(). ✅ Properly closes resources to avoid memory leaks. Fixes #14367 -- 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