Unable to index data to Elasticsearch 7.2 after adding custom template

I am trying to index data to elastic. Indexing does not happen when I have a mapping for 'uid' as keyword. But it works when there are no custom mappings defined for 7.2 version. Please help.

Below is the custom template:

curl -X PUT "localhost:9200/_template/template_fortest" -H 'Content-Type: application/json' -d'
{
"index_patterns": "math*",
"settings": {
"number_of_shards": 2
},
"order" : -4,
"mappings": {
"properties": {
"uid": {
"type": "keyword"
}
}
}
}
'

Hey,

can you share a full reproduction including error messages? What happens when a document is indexed, what exception is returned?

Also, please specify the full version of the stack you are using and take your time to properly format your code snippets, as this is super to read. This forum supports markdown.

--Alex

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.