Can we create Dynamic fields in schema?

Hello Team,

Is it possible to create Dynamic fields in schema?
Use case :if I am ingesting a document with 5 fields and all of them are typicallye double and have same properties.so instead of creating 5 different fields in schema can I create one field with some pattern and while ingesting if I follow that pattern on field, the field would get created with respective properties.

For example

"mappings" : {
"_doc" : {
"properties" : {
"<field_name>" : { "type" : "text"
}
}
}

Thanks in advance for your help.

Thank you,
Aditya

You should take a look at dynamic templates as well as index templates

--Alex

1 Like

Thank you very much Alex.

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