Explicit mapping not carried over on daily index creation

I am trying to visualize a wait_time field. In order to do so, I turned it into a long:

curl -H 'Content-Type:application/json' -s -X POST 'localhost:9200/logstash-*/_mapping/doc?pretty' -d '{
"properties": {
"wait_time" : {
"type": "long"

This was working nicely, but indices are created daily, and when the new index was created, the wait_time field defaulted to "text". Is there any way to make sure that the "long" type persists?


You need to add it to the _template for it to constantly apply - https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-templates.html

Great, thank you very much!

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