I have one template in my production cluster that is not working. Whenever I post to create a new index with it I get:
POST ticket-me/doc/
{"admit_email": "example@example.com"}
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "Mapping definition for [admit_email] has unsupported parameters: [search_analyzer : standard] [analyzer : autocomplete]"
}
],
"type": "mapper_parsing_exception",
"reason": "Failed to parse mapping [doc]: Mapping definition for [admit_email] has unsupported parameters: [search_analyzer : standard] [analyzer : autocomplete]",
"caused_by": {
"type": "mapper_parsing_exception",
"reason": "Mapping definition for [admit_email] has unsupported parameters: [search_analyzer : standard] [analyzer : autocomplete]"
}
},
"status": 400
}
If I change the name and the index-patterns
to create a new template with the same configuration, that template works. The whole setup also works fine in my other cluster.
I'd appreciate any ideas.
Thanks.
The template is:
PUT _template/ticket
{
"index_patterns": [
"ticket-*"
],
"settings": {
"number_of_replicas": 0,
"number_of_shards": 1,
"analysis": {
"filter": {
"autocomplete_filter": {
"type": "edge_ngram",
"min_gram": 1,
"max_gram": 20
}
},
"analyzer": {
"autocomplete": {
"type": "custom",
"tokenizer": "standard",
"filter": [
"lowercase",
"autocomplete_filter"
]
}
}
},
"refresh_interval": "10s"
},
"mappings": {
"doc": {
"properties": {
"admit_name": {
"type": "text",
"analyzer": "autocomplete",
"search_analyzer": "standard"
},
"admit_email": {
"type": "text",
"analyzer": "autocomplete",
"search_analyzer": "standard"
},
"cart_id": {
"type": "keyword"
},
"cart_number": {
"type": "text",
"analyzer": "autocomplete",
"search_analyzer": "standard"
},
"event_name": {
"type": "keyword"
},
"event_session_id": {
"type": "keyword"
},
"event_template_id": {
"type": "keyword"
},
"extra": {
"type": "text",
"analyzer": "autocomplete",
"search_analyzer": "standard"
},
"identity_id": {
"type": "keyword"
},
"identity_name": {
"type": "text",
"analyzer": "autocomplete",
"search_analyzer": "standard"
},
"identity_email": {
"type": "text",
"analyzer": "autocomplete",
"search_analyzer": "standard"
},
"identity_extra": {
"type": "text",
"analyzer": "autocomplete",
"search_analyzer": "standard"
},
"membership_code": {
"type": "text",
"analyzer": "autocomplete",
"search_analyzer": "standard"
},
"message": {
"type": "text",
"analyzer": "autocomplete",
"search_analyzer": "standard"
},
"order_and_session": {
"type": "keyword"
},
"order_id": {
"type": "keyword"
},
"order_number": {
"type": "text",
"analyzer": "autocomplete",
"search_analyzer": "standard"
},
"order_extra": {
"type": "text",
"analyzer": "autocomplete",
"search_analyzer": "standard"
},
"order_survey": {
"type": "object"
},
"org_id": {
"type": "keyword"
},
"org_name": {
"type": "text",
"analyzer": "autocomplete",
"search_analyzer": "standard"
},
"org_extra": {
"type": "text",
"analyzer": "autocomplete",
"search_analyzer": "standard"
},
"purchased_on": {
"type": "date"
},
"relevant_at": {
"type": "date"
},
"scan_code": {
"type": "text",
"analyzer": "autocomplete",
"search_analyzer": "standard"
},
"seller_id": {
"type": "keyword"
},
"start_datetime": {
"type": "date"
},
"ticket_type_name": {
"type": "keyword"
},
"ticket_group_name": {
"type": "keyword"
}
}
}
}
}