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

[DOCS] Async search response ID clarification #55636

Closed
russcam opened this issue Apr 22, 2020 · 5 comments · Fixed by #55934
Closed

[DOCS] Async search response ID clarification #55636

russcam opened this issue Apr 22, 2020 · 5 comments · Fixed by #55934
Assignees
Labels
>docs General docs changes :Search/Search Search-related issues that do not fall into other categories Team:Docs Meta label for docs team Team:Search Meta label for search team

Comments

@russcam
Copy link
Contributor

russcam commented Apr 22, 2020

When an async search successfully completes within the wait_for_completion_timeout, and no keep_alive parameter is specified such that results will not be available in the cluster, an ID is not returned in the response to a submit async search API.

The documentation for async search APIs does not currently mention this, but I think it would be good to clarify this behaviour.

@russcam russcam added the >docs General docs changes label Apr 22, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs (>docs)

@jimczi jimczi added the :Search/Search Search-related issues that do not fall into other categories label Apr 23, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/Search)

@javanna javanna self-assigned this Apr 24, 2020
@javanna
Copy link
Member

javanna commented Apr 24, 2020

To clarify, keep_alive has little to do with this behaviour. If the request is completed within the wait for completion timeout, you will get back the final response directly, hence the response will not be stored in the cluster and no id will be returned regardless of the keep_alive parameter. There is an undocumented parameter called keep_on_completion that allows to request that every response is stored in the cluster, which is useful for testing but we do not expect users to need to change the default behaviour. I will clarify the docs on this.

As a side note, I still find this potentially confusing, as the keep_alive gets ignored in the described scenario. We did some thinking around these parameters, their meaning and naming, which is summarized in #54069. What we have now is the outcome of that discussion.

@russcam
Copy link
Contributor Author

russcam commented Apr 27, 2020

Sorry, I meant keep_on_completion, not keep_alive. This is what we're using for integration tests for the C# client: elastic/elasticsearch-net@ea847aa

The reason for raising this issue though is that the documentation does not mention any happy path scenario where an ID is not returned, which I think it should, along with document how keep_on_completion works in conjunction to keep_alive.

@javanna
Copy link
Member

javanna commented Apr 27, 2020 via email

javanna added a commit to javanna/elasticsearch that referenced this issue Apr 29, 2020
@rjernst rjernst added Team:Docs Meta label for docs team Team:Search Meta label for search team labels May 4, 2020
javanna added a commit that referenced this issue May 6, 2020
…lts (#55934)

* [DOCS] Async search: clarify behaviour when submit returns final results

Closes #55636

* reword

* iter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>docs General docs changes :Search/Search Search-related issues that do not fall into other categories Team:Docs Meta label for docs team Team:Search Meta label for search team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants