How to make a template for a document which has too many fields?


(Kazuhide Ota) #1

Hello.
I want to make an index template for a document which has over 1000 fileds.
But, I can't understand how to set a valid type for each field because making such template is too terrible...
Can I make an index template which has a vague filed name?
For example, the field name is "*-date".
In this case, I want to set the type, "timedate" for the field.

Best,
kazu1049jp


(Mark Walkom) #2

You could try something like https://www.elastic.co/guide/en/elasticsearch/reference/6.5/dynamic-templates.html

But it'll likely never be 100% perfect due to the size of the index you're dealing with.


(Kazuhide Ota) #3

Thank you for your reply!
I understantd using dynamic template mapping is better.