Single mapping for any document type in an index


(Craig Ching) #1

Is there a way to create a mapping such that any new doc type created in the index automatically has that mapping associated with it? All of my document types have the same schema and I'd like to not have to create mappings every time we index a document of a new doc type.


(Mark Walkom) #2

Sounds like you want https://www.elastic.co/guide/en/elasticsearch/guide/current/index-templates.html


(Craig Ching) #3

Yes, thank you! I knew the feature existed I just couldn't remember what it was! Don't see a way to mark this post as answered, if there is a way, please let me know.


(system) #4