Dynamic template behaviour

Is the following behaviour expected?

I have:

{ "article" : {
"dynamic_templates" : [{
"template_1" : {
"match" : "*",
"match_mapping_type" : "string",
"mapping" : { "type" : "string", "index" :
"not_analyzed", "omit_norms" : "yes" }
}}],
"_all" : {"enabled" : false},
"properties" : {
"title" : { "type" : "string", "analyzer" :
"index_analyzer"}
}}}

But omit_norms does NOT apply to explicit fields under "properties".
So I need to specifiy it again to make it working:

...
"properties" : {
"title" : { "type" : "string", "analyzer" :
"index_analyzer", "omit_norms" : "yes" }
}
...

I would expect that my template 'initializes' the default settings for
the matching fields and I can overwrite those defaults under
properties ...

Regards,
Peter.

Try "omit_norms": true.

On Saturday, July 16, 2011 at 12:41 AM, Karussell wrote:

Is the following behaviour expected?

I have:

{ "article" : {
"dynamic_templates" : [{
"template_1" : {
""match" : "*",
"match_mapping_type" : "string",
"mapping" : { "type" : "string", "index" :
"not_analyzed", "omit_norms" : "yes" }
}}],
"_all" : {"enabled" : false},
"properties" : {
"title" : { "type" : "string", "analyzer" :
"index_analyzer"}
}}}

But omit_norms does NOT apply to explicit fields under "properties".
So I need to specifiy it again to make it working:

...
"properties" : {
"title" : { "type" : "string", "analyzer" :
"index_analyzer", "omit_norms" : "yes" }
}
...

I would expect that my template 'initializes' the default settings for
the matching fields and I can overwrite those defaults under
properties ...

Regards,
Peter.

Uhm, thanks :slight_smile: !

this wrong config should fail louder :wink:

On 16 Jul., 00:05, Shay Banon shay.ba...@elasticsearch.com wrote:

Try "omit_norms": true.

On Saturday, July 16, 2011 at 12:41 AM, Karussell wrote:

Is the following behaviour expected?

I have:

{ "article" : {
"dynamic_templates" : [{
"template_1" : {
""match" : "*",
"match_mapping_type" : "string",
"mapping" : { "type" : "string", "index" :
"not_analyzed", "omit_norms" : "yes" }
}}],
"_all" : {"enabled" : false},
"properties" : {
"title" : { "type" : "string", "analyzer" :
"index_analyzer"}
}}}

But omit_norms does NOT apply to explicit fields under "properties".
So I need to specifiy it again to make it working:

...
"properties" : {
"title" : { "type" : "string", "analyzer" :
"index_analyzer", "omit_norms" : "yes" }
}
...

I would expect that my template 'initializes' the default settings for
the matching fields and I can overwrite those defaults under
properties ...

Regards,
Peter.

Boolean values also automatically handle string values, and only parse for
false state ("false", "0", "off"), everything else is true....

On Sat, Jul 16, 2011 at 8:47 PM, Karussell tableyourtime@googlemail.comwrote:

Uhm, thanks :slight_smile: !

this wrong config should fail louder :wink:

On 16 Jul., 00:05, Shay Banon shay.ba...@elasticsearch.com wrote:

Try "omit_norms": true.

On Saturday, July 16, 2011 at 12:41 AM, Karussell wrote:

Is the following behaviour expected?

I have:

{ "article" : {
"dynamic_templates" : [{
"template_1" : {
""match" : "*",
"match_mapping_type" : "string",
"mapping" : { "type" : "string", "index" :
"not_analyzed", "omit_norms" : "yes" }
}}],
"_all" : {"enabled" : false},
"properties" : {
"title" : { "type" : "string", "analyzer" :
"index_analyzer"}
}}}

But omit_norms does NOT apply to explicit fields under "properties".
So I need to specifiy it again to make it working:

...
"properties" : {
"title" : { "type" : "string", "analyzer" :
"index_analyzer", "omit_norms" : "yes" }
}
...

I would expect that my template 'initializes' the default settings for
the matching fields and I can overwrite those defaults under
properties ...

Regards,
Peter.