You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "javanna (via GitHub)" <gi...@apache.org> on 2023/09/28 19:53:11 UTC

[GitHub] [lucene] javanna commented on a diff in pull request #12606: Create a task executor when executor is not provided

javanna commented on code in PR #12606:
URL: https://github.com/apache/lucene/pull/12606#discussion_r1340606929


##########
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:
   I wonder whether this method is still needed, perhaps it's fine but we could make it final as a follow-up? It could be confusing otherwise for users to figure which of the two methods needs to be overridden between slices and getSlices ?



-- 
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-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org