Is it possible to have the settings and mappings in one config file

At the moment I have my mapping file in the location
'ES_HOME/config/default.mapping.json' and then I have to post my settings
file containing custom analyzers and tokenizers via a curl command. Is
there a way to place the settings configuration in the default-mapping.json
along with the mappings making the configuration a one step process?

I have tried using the following format in the default-mapping.json but I'm
getting the 'Mapping must have the type as the root object' error:

{
"settings": {
"index": {
"analysis": {
"filter": {
....
},
"tokenizer": {
....
},
"analyzer": {
....
}
}
}
},
"mappings": {
"document": {
"properties": {
....
}
}
}
}

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Hello,

Yes, take a look at templates:

They can contain mappings and index settings, and you can put them in
configuration files, as well as post them via curl.

Best regards,
Radu

http://sematext.com/ -- Elasticsearch -- Solr -- Lucene

On Sun, Jun 16, 2013 at 3:51 PM, es newbie dan.tuffery@gmail.com wrote:

At the moment I have my mapping file in the location
'ES_HOME/config/default.mapping.json' and then I have to post my settings
file containing custom analyzers and tokenizers via a curl command. Is
there a way to place the settings configuration in the default-mapping.json
along with the mappings making the configuration a one step process?

I have tried using the following format in the default-mapping.json but
I'm getting the 'Mapping must have the type as the root object' error:

{
"settings": {
"index": {
"analysis": {
"filter": {
....
},
"tokenizer": {
....
},
"analyzer": {
....
}
}
}
},
"mappings": {
"document": {
"properties": {
....
}
}
}
}

--
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.
For more options, visit 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.
For more options, visit https://groups.google.com/groups/opt_out.