-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Closed as not planned
Labels
:Search Foundations/MappingIndex mappings, including merging and defining field typesIndex mappings, including merging and defining field types>breaking>bugTeam:Search FoundationsMeta label for the Search Foundations team in ElasticsearchMeta label for the Search Foundations team in Elasticsearch
Description
Elasticsearch version (bin/elasticsearch --version): 5.3.0
Plugins installed: []
JVM version (java -version): 1.8
OS version (uname -a if on a Unix-like system):
Description of the problem including expected versus actual behavior:
Steps to reproduce:
- create template with dynamic_templates in mappings
PUT /_template/dynamic
{
"template" : "*",
"mappings": {
"default": {
"dynamic_templates": [
{
"string_as_text": {
"match": "*_text",
"match_mapping_type": "string",
"mapping": {
"type": "text",
"analyzer": "ik_max_word"
}
}
}
]
}
}
}
- create index with dynamic_templates in mappings
PUT /test_dynamic
{
"mappings": {
"default": {
"dynamic_templates": [
{
"string_as_text": {
"match_mapping_type": "string",
"mapping": {
"type": "text",
"analyzer": "ik_max_word"
}
}
}
]
}
}
}
- get index mappings, i hope it use the second dynamic_templates without 'match' parameter, but it will use the first
GET /test_dynamic/_mappings
{
"test_dynamic" : {
"mappings" : {
"default" : {
"dynamic_templates" : [
{
"string_as_text" : {
"match" : "*_text",
"match_mapping_type" : "string",
"mapping" : {
"analyzer" : "ik_max_word",
"type" : "text"
}
}
}
]
}
}
}
}
Metadata
Metadata
Assignees
Labels
:Search Foundations/MappingIndex mappings, including merging and defining field typesIndex mappings, including merging and defining field types>breaking>bugTeam:Search FoundationsMeta label for the Search Foundations team in ElasticsearchMeta label for the Search Foundations team in Elasticsearch