Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Give precedence to index creation when mixing typed templates with typeless index creation and vice-versa. #37871
Currently if you mix typed templates and typeless index creation or typeless
This commit proposes to give precedence to the index creation call so that
This is consistent with the fact that index creation already "wins" if a field
changed the title
Give precedence to index creation when mixing typed templates with ty…
Jan 25, 2019
jtibshirani left a comment •
Thanks a lot @jpountz for this PR!
I originally had a different intuition for the behavior: I expected that given a template with a custom type, and a typeless create index request, the final index would contain the custom type. This is because I think of create index requests with no mappings as being 'typeless', and these requests won't influence the type of the final index. The overall principle is something like 'a custom type always wins out over having no type (including the dummy
However, I can see the benefits of this approach -- it fits with the overall idea of the index request 'winning out', and users have more flexibility to convert each index creation to a typeless one. In any case, since the right behavior is not obvious, I think it would be worth updating the templates documentation with an explanation.