-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Data Management/Indices APIsAPIs to create and manage indices and templatesAPIs to create and manage indices and templates>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*.
Metadata
Metadata
Assignees
Labels
:Data Management/Indices APIsAPIs to create and manage indices and templatesAPIs to create and manage indices and templates>bughelp wantedadoptmeadoptme