-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Add a checkCancelled public method to ContextIndexSearcher #121349
Comments
Maybe an easier access would be to have an access point to elasticsearch/server/src/main/java/org/elasticsearch/search/internal/SearchContext.java Line 107 in 0d2db06
|
Pinging @elastic/es-search-foundations (Team:Search Foundations) |
Hey @scampi the fact that we expose |
sorry for the late reply @javanna
This would be nice, however
|
Thanks for clarifying @scampi , that makes sense to me. |
Description
The
ContextIndexSearcher
has some API to deal with cancelled tasks, see for examplehasCancellations()
below. Acting on cancelled tasks can be useful inValueFetcher
s (which can be implemented by plugins via custom runtime fields), where resources can be released in such a case.Although the method
hasCancellations()
is public and accessible to plugins, there is however no access point to its counterpartcheckCancelled()
(see below): that method would be needed to check if the search's task got cancelled (and act upon it).checkCancelled()
, in order to allow plugins to handle cancellations in custom runtime fields ?IndexSearcher
s used in Elasticsearch allContextIndexSearcher
instances ?elasticsearch/server/src/main/java/org/elasticsearch/search/internal/ContextIndexSearcher.java
Line 193 in 0d2db06
elasticsearch/server/src/main/java/org/elasticsearch/index/mapper/MappedFieldType.java
Line 118 in 0d2db06
elasticsearch/server/src/main/java/org/elasticsearch/search/internal/ContextIndexSearcher.java
Line 594 in 0d2db06
The text was updated successfully, but these errors were encountered: