Custom template in config/templates


Is it still possible in 2.3.3 to use config/templates folder to store custom templates ? I saw in 1.6 doc that it was possible :

For example, a file called template_1.json can be placed under config/templates and it will be added if it matches an index

We are trying hard but do not manage to make it work, we place a mytemplate.json file with a copy paste definition of the default one (the one adding .raw fields).

When we use the API to PUT the template, it works.

Our need is to use this folder if still possible, or call API to PUT the template in the docker, but there we can't call it because the entrypoint doesn't give back hand.

Thanks for your help :slight_smile:

The ability to configure index templates through files has been deprecated in Elasticsearch 2.x.

That's what we though.

We tricked a command in docker to do a curl PUT after elasticsearch is launched, ugly but works :wink:

FYI, here is our uggly-but-working trick

nohup wget --retry-connrefused && 
curl -H "Content-Type: application/json" -XPUT 
--data @/usr/share/elasticsearch/config/templates/my-template_default.json &
//then we call the blocking entrypoint