How to prevent autmatically type conversion in elasticsearch

hi, i use filebeat to send tomcat accesslog to logstash and after that send from logstash to elasticsearch, my data has a field with name logDate, i convert it to string in filebeat and logstash but its type in elasticseach become date. elasticsearch changes this field type depend on first value that sent to elastic for example if the first value before index created be '-' elastic set this field type to string but if the first data be '2020-12-12' set to date.
my data has different value. how can force elasticsearch to set string type for this field?

Welcome to our community! :smiley:

You need to use an index template to handle this for you.

1 Like

thank you

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