Dynamic templates


(searchersteve) #1

Trying to implement dynamic templating in my app, consulting ES docs here. I'm not sure on what REST call I should be using. Should it be:

curl 'http://localhost:9200/twitter/tweets/_dynamic_templates' -d '
'{
"person" : {
"dynamic_templates" : [
{
"template_1" : {
etcetera....

Or should I be including the "dynamic_templates" portion of the JSON in a standard mapping PUT:

'curl -XPUT 'http://localhost:9200/twitter/tweets/_mapping' -d '
''{tweet:
"person" : {
"dynamic_templates" : [
{
"template_1" : {
etcetera....


(Shay Banon) #2

It should be part of the mapping when you PUT it in elasticsearch using the put mapping API.
On Saturday, January 15, 2011 at 2:00 AM, searchersteve wrote:

Trying to implement dynamic templating in my app, consulting ES docs
http://www.elasticsearch.com/docs/elasticsearch/mapping/root_object_type/#dynamic_templates
here . I'm not sure on what REST call I should be using. Should it be:

curl 'http://localhost:9200/twitter/tweets/_dynamic_templates' -d '
'{
"person" : {
"dynamic_templates" : [
{
"template_1" : {
etcetera....

Or should I be including the "dynamic_templates" portion of the JSON in a
standard mapping PUT:

'curl -XPUT 'http://localhost:9200/twitter/tweets/_mapping' -d '
''{tweet:
"person" : {
"dynamic_templates" : [
{
"template_1" : {
etcetera....

--
View this message in context: http://elasticsearch-users.115913.n3.nabble.com/Dynamic-templates-tp2259254p2259254.html
Sent from the ElasticSearch Users mailing list archive at Nabble.com.


(system) #3