-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Add async_search get and delete APIs to HLRC #53828
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
Conversation
|
Pinging @elastic/es-core-features (:Core/Features/Java High Level REST Client) |
|
Pinging @elastic/es-search (:Search/Search) |
This commit adds the "_async_searhc" get and delete APIs to the AsyncSearchClient in the High Level Rest Client. Relates to elastic#49091
2be7a0a to
e98a619
Compare
...-high-level/src/main/java/org/elasticsearch/client/asyncsearch/DeleteAsyncSearchRequest.java
Outdated
Show resolved
Hide resolved
...est-high-level/src/main/java/org/elasticsearch/client/asyncsearch/GetAsyncSearchRequest.java
Outdated
Show resolved
Hide resolved
...est-high-level/src/main/java/org/elasticsearch/client/asyncsearch/GetAsyncSearchRequest.java
Outdated
Show resolved
Hide resolved
...est-high-level/src/main/java/org/elasticsearch/client/asyncsearch/GetAsyncSearchRequest.java
Show resolved
Hide resolved
10261bf to
28b307a
Compare
2eca524 to
9266287
Compare
jimczi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left one comment regarding the naming in the AsyncSearchClient, LGTM otherwise.
client/rest-high-level/src/test/java/org/elasticsearch/client/asyncsearch/AsyncSearchIT.java
Outdated
Show resolved
Hide resolved
| * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html"> the docs</a> for more. | ||
| * | ||
| */ | ||
| public AsyncSearchResponse getAsyncSearch(GetAsyncSearchRequest request, RequestOptions options) throws IOException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we can rename into get and getAsync since we're already inside the AsyncSearchClient ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, no problem with that...
| * @return the response | ||
| * @throws IOException in case there is a problem sending the request or parsing back the response | ||
| */ | ||
| public AcknowledgedResponse deleteAsyncSearch(DeleteAsyncSearchRequest request, RequestOptions options) throws IOException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, delete should be enough ?
| * @param listener the listener to be notified upon request completion | ||
| * @return cancellable that may be used to cancel the request | ||
| */ | ||
| public Cancellable deleteAsyncSearchAsync(DeleteAsyncSearchRequest request, RequestOptions options, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deleteAsync ?
| return restHighLevelClient.performRequestAsyncAndParseEntity(request, AsyncSearchRequestConverters::deleteAsyncSearch, options, | ||
| AcknowledgedResponse::fromXContent, listener, emptySet()); | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also rename submitAsyncSearch into submit and submitAsync ?
This commit adds the "_async_searhc" get and delete APIs to the AsyncSearchClient in the High Level Rest Client. Relates to elastic#49091 Backport of elastic#53828
This commit adds the "_async_searhc" get and delete APIs to the
AsyncSearchClient in the High Level Rest Client.
Relates to #49091