-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Shrink API attempts to apply mapping from index templates. #25035
Copy link
Copy link
Closed
Labels
:Data Management/Indices APIsDO NOT USE. Use ":Distributed/Indices APIs" or ":StorageEngine/Templates" instead.DO NOT USE. Use ":Distributed/Indices APIs" or ":StorageEngine/Templates" instead.>bughelp wantedadoptmeadoptme
Description
Elasticsearch version: 5.3
Plugins installed: Cerebro, X-Pack
JVM version (java -version): 1.8.0_66
OS version (uname -a if on a Unix-like system): RHEL 7.3
Description of the problem including expected versus actual behavior: When trying to call shrink API and the destination index matches a template that provides mappings they get an error:
{"error":{"root_cause":[{"type":"remote_transport_exception","reason":"[xxx-master][x.x.x.x:9300][indices:admin/shrink]"}],"type":"illegal_argument_exception","reason":"mappings are not allowed when shrinking indices, all mappings are copied from the source index"},"status":400}
It would be nice if the shrink API bypassed checking for index templates that match the destination index. The error is misleading too since no mappings were provided by the user.
Steps to reproduce:
- Create index template for FooIndex* that includes a mapping.
- Create index that matches index pattern FooIndex*
- Call Shrink API for index created in step 2, making destination index also match the pattern FooIndex*.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
:Data Management/Indices APIsDO NOT USE. Use ":Distributed/Indices APIs" or ":StorageEngine/Templates" instead.DO NOT USE. Use ":Distributed/Indices APIs" or ":StorageEngine/Templates" instead.>bughelp wantedadoptmeadoptme
Type
Fields
Give feedbackNo fields configured for issues without a type.