Templates are not updated


(Bernhard Berger) #1

The templates from "localhost:9200/_template" get not updated with the
configured one, even when I create an index.
I am not sure, is this is a bug?

Steps to reproduce:

  1. Create in a fresh Elasticsearch 1.2.1 installation the file
    "config/templates/template_1.json" like in this example
    http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-templates.html#config

  2. Start Elasticsearch

  3. Create an index:
    curl localhost:9200/test

  4. Check that the mapping is used from our template_1:
    curl localhost:9200/_mapping/

  5. ...but the templates are not updated:
    curl localhost:9200/_template/
    -> Empty result - is this a bug?

In my app I just want to check if the user has installed Elasticsearch
with the correct templates. - But localhost:9200/_template/ seems only
to work after documents has already been indexed when using the config
directory for templates.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/53906677.8030303%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


(Antonio Augusto Santos) #2

AFAIK the templates that lives on the filesystem are not put on "_template".
Also, you can update the template on the FS without restarting ES and it
will get the new info there.

On Thursday, June 5, 2014 9:45:53 AM UTC-3, Bernhard Berger wrote:

The templates from "localhost:9200/_template" get not updated with the
configured one, even when I create an index.
I am not sure, is this is a bug?

Steps to reproduce:

  1. Create in a fresh Elasticsearch 1.2.1 installation the file
    "config/templates/template_1.json" like in this example

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-templates.html#config

  1. Start Elasticsearch

  2. Create an index:
    curl localhost:9200/test

  3. Check that the mapping is used from our template_1:
    curl localhost:9200/_mapping/

  4. ...but the templates are not updated:
    curl localhost:9200/_template/
    -> Empty result - is this a bug?

In my app I just want to check if the user has installed Elasticsearch
with the correct templates. - But localhost:9200/_template/ seems only
to work after documents has already been indexed when using the config
directory for templates.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/77a13bb8-5e96-430f-99ab-845df94ff255%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(Bernhard Berger) #3

Thanks, that was an unexpected behaviour for me. I will avoid filesystem
templates in the future and directly PUT templates in my application to
Elasticsearch.

Am 05.06.2014 15:05, schrieb Antonio Augusto Santos:

AFAIK the templates that lives on the filesystem are not put on
"_template".
Also, you can update the template on the FS without restarting ES and
it will get the new info there.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/539072FC.4040303%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


(system) #4