Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update javadocs for QueryTimeout #12272

Merged
merged 2 commits into from
May 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions lucene/core/src/java/org/apache/lucene/index/QueryTimeout.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}