Skip to content

Conversation

jimczi
Copy link
Contributor

@jimczi jimczi commented Nov 4, 2020

This change ensures that we create the async search index with the right mappings and settings when updating or deleting a document. Users can delete the async search index at any time so we have to re-create it internally if necessary before applying any new operation.

This change registers a template for the .async-search system index in order
to ensure that deleting and re-creating the index outside of the async search API
doesn't break the strict mapping.
@jimczi jimczi added >enhancement :Search/Search Search-related issues that do not fall into other categories v8.0.0 v7.11.0 labels Nov 4, 2020
@jimczi jimczi requested a review from imotov November 4, 2020 18:05
@elasticmachine
Copy link
Collaborator

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

@elasticmachine elasticmachine added the Team:Search Meta label for search team label Nov 4, 2020
Copy link
Contributor

@imotov imotov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM in general, but I wonder if we can somehow avoid extending async search role with index template privilege.

@jimczi jimczi changed the title Register a template for .async-search index Create async search index if necessary on updates and deletes Dec 1, 2020
@jimczi
Copy link
Contributor Author

jimczi commented Dec 1, 2020

@imotov , we discussed with @albertzaharovits and agreed that an index template is not needed. Instead, we ensure that the index is re-created when necessary on every operation (index, delete and update). We do the same for the security index so that's consistent. I updated the title, description and modified the PR to reflect the last discussions. Can you take another look ?

Copy link
Contributor

@imotov imotov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think reasoning for creating an index while deleting response is not very intuitive. Perhaps, a comment explaining a rationale for it could help.

@jimczi jimczi merged commit 2adac36 into elastic:master Dec 2, 2020
@jimczi jimczi deleted the async_search_index_template branch December 2, 2020 07:54
jimczi added a commit that referenced this pull request Dec 2, 2020
This change ensures that we create the async search index with the right mappings and settings when updating or deleting a document. Users can delete the async search index at any time so we have to re-create it internally if necessary before applying any new operation.
jimczi added a commit that referenced this pull request Dec 2, 2020
This change ensures that we create the async search index with the right mappings and settings when updating or deleting a document. Users can delete the async search index at any time so we have to re-create it internally if necessary before applying any new operation.
@jimczi jimczi added the v7.10.1 label Dec 2, 2020
@jakelandis jakelandis removed the v8.0.0 label Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team v7.10.1 v7.11.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants