Alright, that sounds like what I am looking for, but I cannot get it to
work. I've tried and I'm missing something.
- Create /config/templates/template1.yml
template : "",
mappings :
default :
dynamic_templates :
templ_int :
match : "_i"
mapping :
type : "integer"
index : "not_analyzed"
store : "yes"
I also tried
template_1 :
template : "",
mappings :
default :
dynamic_templates :
templ_int :
match : "_i"
mapping :
type : "integer"
index : "not_analyzed"
store : "yes"
But neither of them are applying. http://localhost:9200/_all/_mapping
reveals:
{"test":{"customer":{"properties":{"owner_id_i":{"type":"date","format":"dateOptionalTime"}}}}}
After entering multiple items with fields that match *_i in the "test" index
And is there any reason I would not want to store int? I was just going off the mapping base types.
Thanks,
Sky
On Friday, April 13, 2012 5:25:02 AM UTC-7, kimchy wrote:
Not in elasticsearch.yml, but you can create an index template
configuration, with a template matching *. Btw, why do you need to have the
int stored?
On Thu, Apr 12, 2012 at 5:39 PM, Sky Stebnicki sky.stebnicki@gmail.comwrote:
Sorry to resurrect such an old thread, but I had one simple follow-up
question. If I wanted to set this in a configuration file is that possible?
For example:
/config/elasticsearch.yml
mappings :
default :
dynamic_templates :
templ_int :
match : "*_i"
mapping :
type : "int"
index : "not_analyzed"
store : "yes"
Thanks again for your help!
Sky
On Tuesday, February 7, 2012 3:48:01 AM UTC-8, kimchy wrote:
When you put mapping against an index, you can specify the mapping type
to be default, and it will apply to any mapping type in that index.
On Tuesday, February 7, 2012 at 7:31 AM, SkyStebnicki wrote:
Thanks for taking the time to write. That is definitely looking like
what I will need. Do you know if there is any way to set the dynamic
mapping template for an entire index rather than for each type?
So I would basically just create a new template for each type right?
For example:
{
"customer" :
{
"dynamic_templates" : [
{
"template_int" : {
"match" : "_i",
"mapping" : {
"type" : "integer"
}
}
},
{
"template_str" : {
"match" : "_s",
"mapping" : {
"type" : "string"
}
}
}
]
}
}
On Feb 2, 11:03 am, Nick Hoffman n...@deadorange.com wrote:
Hey there, Sky. Have a look at dynamic templates:http://www.**
Elasticsearch Platform — Find real-time answers at scale | Elastichttp://www.elasticsearch.org/guide/reference/mapping/root-object-type
...
On Friday, April 13, 2012 5:25:02 AM UTC-7, kimchy wrote:
Not in elasticsearch.yml, but you can create an index template
configuration, with a template matching *. Btw, why do you need to have the
int stored?
On Thu, Apr 12, 2012 at 5:39 PM, Sky Stebnicki sky.stebnicki@gmail.comwrote:
Sorry to resurrect such an old thread, but I had one simple follow-up
question. If I wanted to set this in a configuration file is that possible?
For example:
/config/elasticsearch.yml
mappings :
default :
dynamic_templates :
templ_int :
match : "*_i"
mapping :
type : "int"
index : "not_analyzed"
store : "yes"
Thanks again for your help!
Sky
On Tuesday, February 7, 2012 3:48:01 AM UTC-8, kimchy wrote:
When you put mapping against an index, you can specify the mapping type
to be default, and it will apply to any mapping type in that index.
On Tuesday, February 7, 2012 at 7:31 AM, SkyStebnicki wrote:
Thanks for taking the time to write. That is definitely looking like
what I will need. Do you know if there is any way to set the dynamic
mapping template for an entire index rather than for each type?
So I would basically just create a new template for each type right?
For example:
{
"customer" :
{
"dynamic_templates" : [
{
"template_int" : {
"match" : "_i",
"mapping" : {
"type" : "integer"
}
}
},
{
"template_str" : {
"match" : "_s",
"mapping" : {
"type" : "string"
}
}
}
]
}
}
On Feb 2, 11:03 am, Nick Hoffman n...@deadorange.com wrote:
Hey there, Sky. Have a look at dynamic templates:http://www.**
Elasticsearch Platform — Find real-time answers at scale | Elastichttp://www.elasticsearch.org/guide/reference/mapping/root-object-type
...
On Friday, April 13, 2012 5:25:02 AM UTC-7, kimchy wrote:
Not in elasticsearch.yml, but you can create an index template
configuration, with a template matching *. Btw, why do you need to have the
int stored?
On Thu, Apr 12, 2012 at 5:39 PM, Sky Stebnicki sky.stebnicki@gmail.comwrote:
Sorry to resurrect such an old thread, but I had one simple follow-up
question. If I wanted to set this in a configuration file is that possible?
For example:
/config/elasticsearch.yml
mappings :
default :
dynamic_templates :
templ_int :
match : "*_i"
mapping :
type : "int"
index : "not_analyzed"
store : "yes"
Thanks again for your help!
Sky
On Tuesday, February 7, 2012 3:48:01 AM UTC-8, kimchy wrote:
When you put mapping against an index, you can specify the mapping type
to be default, and it will apply to any mapping type in that index.
On Tuesday, February 7, 2012 at 7:31 AM, SkyStebnicki wrote:
Thanks for taking the time to write. That is definitely looking like
what I will need. Do you know if there is any way to set the dynamic
mapping template for an entire index rather than for each type?
So I would basically just create a new template for each type right?
For example:
{
"customer" :
{
"dynamic_templates" : [
{
"template_int" : {
"match" : "_i",
"mapping" : {
"type" : "integer"
}
}
},
{
"template_str" : {
"match" : "_s",
"mapping" : {
"type" : "string"
}
}
}
]
}
}
On Feb 2, 11:03 am, Nick Hoffman n...@deadorange.com wrote:
Hey there, Sky. Have a look at dynamic templates:http://www.**
Elasticsearch Platform — Find real-time answers at scale | Elastichttp://www.elasticsearch.org/guide/reference/mapping/root-object-type
...