# Template autoloading not working

**URL:** <https://discuss.elastic.co/t/template-autoloading-not-working/14705>\
**Category:** Elasticsearch\
**Created:** [December 4, 2013, 1:07pm UTC](https://discuss.elastic.co/t/template-autoloading-not-working/14705 "2013-12-04T13:07:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Klavs\_Klavsen](https://avatars.discourse-cdn.com/v4/letter/k/90db22/32.png) [@Klavs\_Klavsen](https://discuss.elastic.co/u/Klavs_Klavsen)\
**Post date:** [December 4, 2013, 1:07pm UTC](https://discuss.elastic.co/t/template-autoloading-not-working/14705/1 "2013-12-04T13:07:14Z")

</div>

I've read  
[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-templates.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-templates.html)  
and es.path.conf on running ES i points to /etc/elasticsearch and I've put  
my template file in /etc/elasticsearch/templates/logstash.json

I can load fine using curl XPUT - with the  
template : "logstash {  
}

lines removed (since the XPUT has the name in the URL instead.

Here's the content:  
{  
template : "logstash" {  
"template" : "logstash-_",  
"settings" : {  
"index.cache.field.type" : "soft",  
"index.refresh\_interval" : "5s",  
"index" : {  
"query" : { "default\_field" : "message" },  
"store" : { "compress" : { "stored" : true, "tv": true } }  
}  
},  
"mappings": {  
"default": {  
"\_all": { "enabled": false },  
"\_source": { "compress": true },  
"dynamic\_templates": [{  
"string\_template" : {  
"match" : "_",  
"mapping": { "type": "string", "index": "not\_analyzed" },  
"match\_mapping\_type" : "string"  
}  
}],  
"\_id" : { "path" : "message\_id"},  
"properties" : {  
"message" : { "type" : "string", "index" : "analyzed" },  
"host" : { "type" : "string", "index" : "not\_analyzed" },  
"source\_path" : { "type" : "string", "index" : "not\_analyzed" },  
"tags": { "type": "string", "index" : "not\_analyzed" },  
"@timestamp" : { "type" : "date", "index" : "not\_analyzed" },  
"type" : { "type" : "string", "index" : "not\_analyzed" }  
}  
}  
}  
}  
}

I see no log lines, not with DEBUG loglevel either - relating to his ☹

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/a775b1c0-78ab-4f5d-a147-f8adeda13972%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a775b1c0-78ab-4f5d-a147-f8adeda13972%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Klavs\_Klavsen](https://avatars.discourse-cdn.com/v4/letter/k/90db22/32.png) [@Klavs\_Klavsen](https://discuss.elastic.co/u/Klavs_Klavsen)\
**Post date:** [December 4, 2013, 1:07pm UTC](https://discuss.elastic.co/t/template-autoloading-not-working/14705/2 "2013-12-04T13:07:43Z")

</div>

I'm running 0.90.6 on openjdk 1.7 btw. 🙂

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8bd05e94-7b73-450e-b7f0-4b79e11decd3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8bd05e94-7b73-450e-b7f0-4b79e11decd3%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [December 5, 2013, 3:12pm UTC](https://discuss.elastic.co/t/template-autoloading-not-working/14705/3 "2013-12-05T15:12:05Z")

</div>

When are you expecting the template to be reloaded? It should only be  
reloaded upon a new index creation.

--  
Ivan

On Wed, Dec 4, 2013 at 5:07 AM, Klavs Klavsen [klavs@enableit.dk](mailto:klavs@enableit.dk) wrote:

> I'm running 0.90.6 on openjdk 1.7 btw. 🙂
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/8bd05e94-7b73-450e-b7f0-4b79e11decd3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8bd05e94-7b73-450e-b7f0-4b79e11decd3%40googlegroups.com)  
> .
> 
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQB7ZBwv947LTKnG\_GW1pEDs\_pf6YcW6GfGPjnVXQhT8DA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQB7ZBwv947LTKnG_GW1pEDs_pf6YcW6GfGPjnVXQhT8DA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [December 5, 2013, 3:30pm UTC](https://discuss.elastic.co/t/template-autoloading-not-working/14705/4 "2013-12-05T15:30:27Z")

</div>

Hey,

you may have hit [Loading templates via templates/ directory is not working · Issue #4235 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/4235)

can you test with the beta1 and see if it is working maybe?

--Alex

On Thu, Dec 5, 2013 at 4:12 PM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:

> When are you expecting the template to be reloaded? It should only be  
> reloaded upon a new index creation.
> 
> --  
> Ivan
> 
> On Wed, Dec 4, 2013 at 5:07 AM, Klavs Klavsen [klavs@enableit.dk](mailto:klavs@enableit.dk) wrote:
> 
> > I'm running 0.90.6 on openjdk 1.7 btw. 🙂
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/8bd05e94-7b73-450e-b7f0-4b79e11decd3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8bd05e94-7b73-450e-b7f0-4b79e11decd3%40googlegroups.com)  
> > .
> > 
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQB7ZBwv947LTKnG\_GW1pEDs\_pf6YcW6GfGPjnVXQhT8DA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQB7ZBwv947LTKnG_GW1pEDs_pf6YcW6GfGPjnVXQhT8DA%40mail.gmail.com)  
> .
> 
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAGCwEM8DDM%2BKGOLs-uykZ2FPHkb0Ps8-oO3Zaxu0R7HtnUksew%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM8DDM%2BKGOLs-uykZ2FPHkb0Ps8-oO3Zaxu0R7HtnUksew%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [December 5, 2013, 3:59pm UTC](https://discuss.elastic.co/t/template-autoloading-not-working/14705/5 "2013-12-05T15:59:53Z")

</div>

Hey,

I was talking about beta2, sorry for the confusion.

--Alex

On Thu, Dec 5, 2013 at 4:30 PM, Alexander Reelsen [alr@spinscale.de](mailto:alr@spinscale.de) wrote:

> Hey,
> 
> you may have hit  
> [Loading templates via templates/ directory is not working · Issue #4235 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/4235)
> 
> can you test with the beta1 and see if it is working maybe?
> 
> --Alex
> 
> On Thu, Dec 5, 2013 at 4:12 PM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:
> 
> > When are you expecting the template to be reloaded? It should only be  
> > reloaded upon a new index creation.
> > 
> > --  
> > Ivan
> > 
> > On Wed, Dec 4, 2013 at 5:07 AM, Klavs Klavsen [klavs@enableit.dk](mailto:klavs@enableit.dk) wrote:
> > 
> > > I'm running 0.90.6 on openjdk 1.7 btw. 🙂
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/8bd05e94-7b73-450e-b7f0-4b79e11decd3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8bd05e94-7b73-450e-b7f0-4b79e11decd3%40googlegroups.com)  
> > > .
> > > 
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQB7ZBwv947LTKnG\_GW1pEDs\_pf6YcW6GfGPjnVXQhT8DA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQB7ZBwv947LTKnG_GW1pEDs_pf6YcW6GfGPjnVXQhT8DA%40mail.gmail.com)  
> > .
> > 
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAGCwEM98kWzMwp7LPUMUjeyng\_%2B78Z5oYpZU2Pcx8S8dBP1hBA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM98kWzMwp7LPUMUjeyng_%2B78Z5oYpZU2Pcx8S8dBP1hBA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:03am UTC](https://discuss.elastic.co/t/template-autoloading-not-working/14705/6 "2017-07-06T02:03:03Z")

</div>


