Template mappings vs config mappings

Hi,

If I have a default mapping for type "mytype" in
config/mappings/_default/mytype.json and I create a template with

{
"template" : "*",
"settings" : { ... },
"mappings" : {"mytype": { ... }}
}

whenever a new index is created, it seems that both mappings are
merged. Is this the intended behaviour? Is there a way to force the
template mapping over the config mapping without stopping the cluster?

Thanks,
Colin

Yes, this is the intended behavior. There is no option to force one over the other aside from not using one of them.

On Tuesday, May 31, 2011 at 10:35 PM, Colin Surprenant wrote:

Hi,

If I have a default mapping for type "mytype" in
config/mappings/_default/mytype.json and I create a template with

{
"template" : "*",
"settings" : { ... },
"mappings" : {"mytype": { ... }}
}

whenever a new index is created, it seems that both mappings are
merged. Is this the intended behaviour? Is there a way to force the
template mapping over the config mapping without stopping the cluster?

Thanks,
Colin

Ok, thanks.

Is there a way to get rid of the config mappings without restarting ES?

Colin

On Tue, May 31, 2011 at 7:22 PM, Shay Banon
shay.banon@elasticsearch.com wrote:

Yes, this is the intended behavior. There is no option to force one over the
other aside from not using one of them.

On Tuesday, May 31, 2011 at 10:35 PM, Colin Surprenant wrote:

Hi,

If I have a default mapping for type "mytype" in
config/mappings/_default/mytype.json and I create a template with

{
"template" : "*",
"settings" : { ... },
"mappings" : {"mytype": { ... }}
}

whenever a new index is created, it seems that both mappings are
merged. Is this the intended behaviour? Is there a way to force the
template mapping over the config mapping without stopping the cluster?

Thanks,
Colin

You can just delete them, they are read on demand when the index is created.

On Wednesday, June 1, 2011 at 4:59 PM, Colin Surprenant wrote:

Ok, thanks.

Is there a way to get rid of the config mappings without restarting ES?

Colin

On Tue, May 31, 2011 at 7:22 PM, Shay Banon
<shay.banon@elasticsearch.com (mailto:shay.banon@elasticsearch.com)> wrote:

Yes, this is the intended behavior. There is no option to force one over the
other aside from not using one of them.

On Tuesday, May 31, 2011 at 10:35 PM, Colin Surprenant wrote:

Hi,

If I have a default mapping for type "mytype" in
config/mappings/_default/mytype.json and I create a template with

{
"template" : "*",
"settings" : { ... },
"mappings" : {"mytype": { ... }}
}

whenever a new index is created, it seems that both mappings are
merged. Is this the intended behaviour? Is there a way to force the
template mapping over the config mapping without stopping the cluster?

Thanks,
Colin