# When elasticsearch-1.0.0.Beta2 index data \[/ config / templates / template.json\] is not in effect

**URL:** <https://discuss.elastic.co/t/when-elasticsearch-1-0-0-beta2-index-data-config-templates-template-json-is-not-in-effect/14817>\
**Category:** Elasticsearch\
**Created:** [December 11, 2013, 3:39pm UTC](https://discuss.elastic.co/t/when-elasticsearch-1-0-0-beta2-index-data-config-templates-template-json-is-not-in-effect/14817 "2013-12-11T15:39:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![persist\_kong](https://avatars.discourse-cdn.com/v4/letter/p/da6949/32.png) [@persist\_kong](https://discuss.elastic.co/u/persist_kong)\
**Post date:** [December 11, 2013, 3:39pm UTC](https://discuss.elastic.co/t/when-elasticsearch-1-0-0-beta2-index-data-config-templates-template-json-is-not-in-effect/14817/1 "2013-12-11T15:39:00Z")

</div>

I downloaded elasticsearch-1.0.0.Beta2.  
and copied [elasticsearch-0.90.7/config/templates/mytemplate.json] to [elasticsearch-1.0.0.Beta2/config/templates/mytemplate.json],  
but when I index data, I found that it did not work.  
So I deleted the [mytemplate.json]. And I copied json from official website to [elasticsearch-1.0.0.Beta2/config/templates/test.json]  
And I copied the official website json to  
elasticsearch-1.0.0.Beta2/config/templates/test.json  
([http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-templates.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-templates.html)  
) .  
``

{  
"template\_1": {  
"template": "\*",  
"settings": {  
"index.number\_of\_shards": 2  
}  
"mappings": {  
"_default_": {  
"\_source": {  
"enabled": false  
}  
}  
"type1": {  
"\_all": {  
"enabled": false  
}  
}  
}  
}  
}

\</ code\>  
My code  
``

BulkRequestBuilder bulkRequest2 = client.prepareBulk ();  
for (int i = 0; i \<10; i + +) {  
XContentBuilder endObject = jsonBuilder (). StartObject ()  
. field ("user", "kimchy"). field ("postDate", new Date ())  
. field ("age", i)  
. field ("message", "trying out Elastic Search")  
. endObject ();

bulkRequest2.add (client.prepareIndex ("test", "test") setSource  
(endObject).);

}  
bulkRequest2.execute () actionGet ().;

\</ code\>

Console Information  
[2013-12-11 23:10:07,676] [INFO] [cluster.metadata] [Ymir] [test] creating  
index, cause [auto (bulk api)], shards [5] / [1], mappi  
ngs []  
[2013-12-11 23:10:08,929] [INFO] [cluster.metadata] [Ymir] [test]  
update\_mapping [test] (dynamic)

Obviously the template does not work.  
I need some help。

--  
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/fd369a62-51f7-4398-898a-d2d5480d3b58%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/fd369a62-51f7-4398-898a-d2d5480d3b58%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:** ![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:01am UTC](https://discuss.elastic.co/t/when-elasticsearch-1-0-0-beta2-index-data-config-templates-template-json-is-not-in-effect/14817/2 "2017-07-06T02:01:58Z")

</div>


