From 48986d17d1205dcef46fa1e3098e4223327cb665 Mon Sep 17 00:00:00 2001
From: Luca Cavanna <javanna@apache.org>
Date: Tue, 9 May 2023 11:27:47 +0200
Subject: [PATCH] Update javadocs for QueryTimeout (#12272)

QueryTimeout was introduced together with ExitableDirectoryReader but is
now also optionally set to the IndexSearcher to wrap the bulk scorer
with a TimeLimitingBulkScorer. Its javadocs needs updating.
---
 .../java/org/apache/lucene/index/QueryTimeout.java  | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/lucene/core/src/java/org/apache/lucene/index/QueryTimeout.java b/lucene/core/src/java/org/apache/lucene/index/QueryTimeout.java
index 0c64f4c2c9ac..f1e543423670 100644
--- a/lucene/core/src/java/org/apache/lucene/index/QueryTimeout.java
+++ b/lucene/core/src/java/org/apache/lucene/index/QueryTimeout.java
@@ -17,14 +17,17 @@
 package org.apache.lucene.index;
 
 /**
- * Base for query timeout implementations, which will provide a {@code shouldExit()} method, used
- * with {@link ExitableDirectoryReader}.
+ * Query timeout abstraction that controls whether a query should continue or be stopped. Can be set
+ * to the searcher through {@link org.apache.lucene.search.IndexSearcher#setTimeout(QueryTimeout)},
+ * in which case bulk scoring will be time-bound. Can also be used in combination with {@link
+ * ExitableDirectoryReader}.
  */
 public interface QueryTimeout {
 
   /**
-   * Called from {@link ExitableDirectoryReader.ExitableTermsEnum#next()} to determine whether to
-   * stop processing a query.
+   * Called to determine whether to stop processing a query
+   *
+   * @return true if the query should stop, false otherwise
    */
-  public abstract boolean shouldExit();
+  boolean shouldExit();
 }