shubhamvishu commented on code in PR #12606: URL: https://github.com/apache/lucene/pull/12606#discussion_r1341393303
########## lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java: ########## @@ -420,13 +418,12 @@ public int count(Query query) throws IOException { } /** - * Returns the leaf slices used for concurrent searching, or null if no {@code Executor} was - * passed to the constructor. + * Returns the leaf slices used for concurrent searching * * @lucene.experimental */ public LeafSlice[] getSlices() { - return (executor == null) ? null : leafSlicesSupplier.get(); + return leafSlicesSupplier.get(); Review Comment: Since the method `#slices(List<LeafReaderContext> leaves)` is protected in `IndexSearcher`, I thought `#getSlices` could be used by other classes(not subclass of `IndexSearcher` and in different package) to get all the slices without having to pass `maxDocsPerSlice` and `maxSegmentsPerSlice` to make use in concurrency?. But giving it a thought again, I feel maybe we should remove/deprecate `#getSlices` and make `slices(List<LeafReaderContext> leaves)` public because `#getSlices` is not doing any extra work other than returning those leaf slices(which is obtained from `#slices`)? Let me know what do you think? -- 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