-
Notifications
You must be signed in to change notification settings - Fork 24.7k
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
Create async search index if necessary on updates and deletes #64606
Conversation
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.
Pinging @elastic/es-search (:Search/Search) |
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.
LGTM in general, but I wonder if we can somehow avoid extending async search role with index template privilege.
...ck/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/AsyncSearchUser.java
Outdated
Show resolved
Hide resolved
.../plugin/core/src/main/java/org/elasticsearch/xpack/core/async/AsyncTaskTemplateRegistry.java
Outdated
Show resolved
Hide resolved
@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 ? |
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 think reasoning for creating an index while deleting response is not very intuitive. Perhaps, a comment explaining a rationale for it could help.
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/async/AsyncTaskIndexService.java
Show resolved
Hide resolved
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 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 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.