Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide better logging on which index template is used during index creation #7421

ppf2 opened this issue Aug 23, 2014 · 2 comments


Copy link

commented Aug 23, 2014

There are 2 ways to create an index template, using the _template end point (dynamic) and as static templates (under config/templates). Currently, when an index is created matching a template (static or dynamic), we log the following entry in the ES log:

[2014-08-23 11:10:51,865][INFO ][cluster.metadata         ] [master2] [index_name] creating index, cause [api], shards [6]/[0], mappings [type1, type2]

There is no indication on which template it used to create the index.

We have seen situations in the field where the end user is confused because they have both dynamic and static templates defined (and dynamic templates take precedence), or if they have multiple templates with the same template matching criteria defined as static templates (so that 1 static template is overwriting the other).

It would be nice to provide some indication in the log regarding the template used when we write out the creating index entry to specify:

  • if the template used is a dynamic or static template, if dynamic, the template name
  • if it is a static template, the file name of the static template it is using

This comment has been minimized.

Copy link

commented Nov 20, 2014

What should be logged in the case that multiple templates are used?


This comment has been minimized.

Copy link

commented Nov 24, 2014

Hi @pkoenig10

Thanks for picking this up. In answer to your question, I'd say that we log the template names in the order that they're applied. Or perhaps I've misunderstood?

When you're ready with your changes, please open a PR referencing this issue, and (if you haven't done so already) sign the CLA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
4 participants
You can’t perform that action at this time.