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

problem picking up templates in the config/templates directory #4411

Closed
debhelsdon opened this issue Dec 11, 2013 · 2 comments · Fixed by #4425
Closed

problem picking up templates in the config/templates directory #4411

debhelsdon opened this issue Dec 11, 2013 · 2 comments · Fixed by #4425

Comments

@debhelsdon
Copy link

I've got it working using the curl query to create a new template.
But when i set it up in the/templates directory it doesnt seem to get picked up at all.
I've seen a bug raised looking similar to this. What is the work around- can i explicitly set the templates path in the config file? Also should i be able to see anything in the logs telling me this the template files are being picked up or not?

Also while looking into this issue i was following the page to see if my templates are created ok : http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-templates.html to get an output of all the loaded up templates, And i've found it doesnt seem to work unless i specify the correct template exact name. So calling curl -XGET localhost:9200/_template/temp* or curl -XGET localhost:9200/_template/ doesnt seem to bring back any output at all.

This was using elasticsearch-0.90.3

@ghost ghost assigned spinscale Dec 12, 2013
@spinscale
Copy link
Contributor

Hey,

it seems you have hit this #4235

This will be fixed in the upcoming 0.90.8 release. If you want to test, you could test elasticsearch 1.0.0beta2 or the current 0.90 branch - would be happy to get feedback

@spinscale
Copy link
Contributor

I found another subtle bug, the #4235 works only if you use

"settings" : { "index.number_of_shards" : 12 } }

but does not work for the shorter version

"settings" : { "number_of_shards" : 12 } }

will fix

spinscale added a commit that referenced this issue Dec 17, 2013
We support three different settings in templates

* "settings" : { "index" : { "number_of_shards" : 12 } }
* "settings" : { "index.number_of_shards" : 12 }
* "settings" : { "number_of_shards" : 12 }

The latter one was not supported by the fix in #4235

This commit fixes this issue and uses randomized testing to test any of the three cases above when running integration tests.

Closes #4411
spinscale added a commit to spinscale/elasticsearch that referenced this issue Dec 20, 2013
The fixes introduced in elastic#4235 and elastic#4411 do not take into account, that a
template JSON in the config/ directory includes a template name, as opposed
when calling the Put Template API.

This PR allows to put both formats (either specifying a template name or not)
into files. However you template name/id may not be one of the template
element names like "template", "settings", "order" or "mapping".

Closes elastic#4511
spinscale added a commit that referenced this issue Dec 22, 2013
The fixes introduced in #4235 and #4411 do not take into account, that a
template JSON in the config/ directory includes a template name, as opposed
when calling the Put Template API.

This PR allows to put both formats (either specifying a template name or not)
into files. However you template name/id may not be one of the template
element names like "template", "settings", "order" or "mapping".

Closes #4511
spinscale added a commit that referenced this issue Dec 22, 2013
The fixes introduced in #4235 and #4411 do not take into account, that a
template JSON in the config/ directory includes a template name, as opposed
when calling the Put Template API.

This PR allows to put both formats (either specifying a template name or not)
into files. However you template name/id may not be one of the template
element names like "template", "settings", "order" or "mapping".

Closes #4511
brusic pushed a commit to brusic/elasticsearch that referenced this issue Jan 19, 2014
We support three different settings in templates

* "settings" : { "index" : { "number_of_shards" : 12 } }
* "settings" : { "index.number_of_shards" : 12 }
* "settings" : { "number_of_shards" : 12 }

The latter one was not supported by the fix in elastic#4235

This commit fixes this issue and uses randomized testing to test any of the three cases above when running integration tests.

Closes elastic#4411
brusic pushed a commit to brusic/elasticsearch that referenced this issue Jan 19, 2014
The fixes introduced in elastic#4235 and elastic#4411 do not take into account, that a
template JSON in the config/ directory includes a template name, as opposed
when calling the Put Template API.

This PR allows to put both formats (either specifying a template name or not)
into files. However you template name/id may not be one of the template
element names like "template", "settings", "order" or "mapping".

Closes elastic#4511
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
We support three different settings in templates

* "settings" : { "index" : { "number_of_shards" : 12 } }
* "settings" : { "index.number_of_shards" : 12 }
* "settings" : { "number_of_shards" : 12 }

The latter one was not supported by the fix in elastic#4235

This commit fixes this issue and uses randomized testing to test any of the three cases above when running integration tests.

Closes elastic#4411
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
The fixes introduced in elastic#4235 and elastic#4411 do not take into account, that a
template JSON in the config/ directory includes a template name, as opposed
when calling the Put Template API.

This PR allows to put both formats (either specifying a template name or not)
into files. However you template name/id may not be one of the template
element names like "template", "settings", "order" or "mapping".

Closes elastic#4511
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants