is it possible to create a template for a type, not an index?
for example, I have 2 indexes:
- House, with types stairs and floors
- Building, with types elevator and floors.
And I want the floor mapping to have the same template...
Thanks for your help!
there is no such thing as a type template but depending on your requirements you may be able to use the multi template matching feature for that. I'd only do this if your match pattern is really simple (e.g. you can match all indices).
Thanks, that sounds like a pretty good solution.
But I have a question, what if the template for "*" will have some definitions for "floors" type, but then I'll have an index with no "floor" type? what will happen to the mappings defined for "floors" when there is no such type in the index?
if you have a template that matches "*" and it contains a mapping for the type "floor", all indices will have a mapping for this type.
If you don't want this, you need a more restrictive match than "*".