creating index template

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

creating index template

This post has NOT been accepted by the mailing list yet.
I am trying to create an index template so that all indices created afterwards have same mapping. Here is how I am creating it:

curl -XPUT localhost:9200/_template/vw_index_template -d ' {
                    "template" : "*_index",
                    "settings" : {
                        "number_of_shards" : 1
                    "mappings" : {
                        "id_prkey_template" : {
                            "properties" : {
                                "_id" : {"type" : "string", "index": "not_analyzed"},
                                "prkey" : {"type" : "string", "index": "analyzed"}

but indices that I create afterwards still have default mapping where they should only have two fields in mapping.

Will appreciate any help.