Strange warning when putting mappings

I am seeing strange warnings (see below) when putting mappings
containing 'dynamic_templates'. The mapping seems perfectly right and
if you closely look at the warning below you find that only the order
of the 'match' and 'match_mapping_type' is different. Content wise the
mappings are the same. Is this a bug in Elastic Search? Is there
anything I can do on my end to avoid the warning (as it is badly
spamming my log files)?

2011-03-08 16:00:34,006 WARN
[elasticsearch[Fagin]clusterService#updateTask-pool-11-thread-1]
[org.elasticsearch.indices.cluster] [ ] - [Fagin] [test_index] parsed
mapping [test_type], and got different sources
original:
{"test_type":{"dynamic_templates":[{"template1":{"mapping":
{"index":"not_analyzed","type":"string"},"match_mapping_type":"string","match":""}}],"properties":
{}}}
parsed:
{"test_type":{"dynamic_templates":[{"template1":{"mapping":
{"index":"not_analyzed","type":"string"},"match":"
","match_mapping_type":"string"}}],"properties":
{}}}

Heya,

Its not something that breaks the system, its just a warning that extra processing of mapping is done (which should not really be done). I simply need to fix it (the warning is there so if I miss something, it will bubble up through the users :slight_smile: ). Can you gist a recreation of this so it will be simpler for me to fix it? (Elasticsearch Platform — Find real-time answers at scale | Elastic)

-shay.banon
On Tuesday, March 8, 2011 at 5:15 PM, Jan Fiedler wrote:
I am seeing strange warnings (see below) when putting mappings

containing 'dynamic_templates'. The mapping seems perfectly right and
if you closely look at the warning below you find that only the order
of the 'match' and 'match_mapping_type' is different. Content wise the
mappings are the same. Is this a bug in Elastic Search? Is there
anything I can do on my end to avoid the warning (as it is badly
spamming my log files)?

2011-03-08 16:00:34,006 WARN
[elasticsearch[Fagin]clusterService#updateTask-pool-11-thread-1]
[org.elasticsearch.indices.cluster] - [Fagin] [test_index] parsed
mapping [test_type], and got different sources
original:
{"test_type":{"dynamic_templates":[{"template1":{"mapping":
{"index":"not_analyzed","type":"string"},"match_mapping_type":"string","match":""}}],"properties":
{}}}
parsed:
{"test_type":{"dynamic_templates":[{"template1":{"mapping":
{"index":"not_analyzed","type":"string"},"match":"
","match_mapping_type":"string"}}],"properties":
{}}}

Created curl based recreation here: Curl based recreation of a strange Elastic Search warning when putting a perfectly valid mapping · GitHub
(git://gist.github.com/861923.git)

On Mar 8, 5:48 pm, Shay Banon shay.ba...@elasticsearch.com wrote:

Heya,

Its not something that breaks the system, its just a warning that extra processing of mapping is done (which should not really be done). I simply need to fix it (the warning is there so if I miss something, it will bubble up through the users :slight_smile: ). Can you gist a recreation of this so it will be simpler for me to fix it? (Elasticsearch Platform — Find real-time answers at scale | Elastic)

-shay.banonOn Tuesday, March 8, 2011 at 5:15 PM, Jan Fiedler wrote:

I am seeing strange warnings (see below) when putting mappings

containing 'dynamic_templates'. The mapping seems perfectly right and
if you closely look at the warning below you find that only the order
of the 'match' and 'match_mapping_type' is different. Content wise the
mappings are the same. Is this a bug in Elastic Search? Is there
anything I can do on my end to avoid the warning (as it is badly
spamming my log files)?

2011-03-08 16:00:34,006 WARN
[elasticsearch[Fagin]clusterService#updateTask-pool-11-thread-1]
[org.elasticsearch.indices.cluster] - [Fagin] [test_index] parsed
mapping [test_type], and got different sources
original:
{"test_type":{"dynamic_templates":[{"template1":{"mapping":
{"index":"not_analyzed","type":"string"},"match_mapping_type":"string","mat ch":""}}],"properties":
{}}}
parsed:
{"test_type":{"dynamic_templates":[{"template1":{"mapping":
{"index":"not_analyzed","type":"string"},"match":"
","match_mapping_type":" string"}}],"properties":
{}}}

Thanks!, pushed a fix: Mapper: Using `dynamic_template` can result in warning of parsed and original source difference (resulting in excessive mapping parsing) · Issue #764 · elastic/elasticsearch · GitHub.
On Wednesday, March 9, 2011 at 11:22 AM, Jan Fiedler wrote:

Created curl based recreation here: Curl based recreation of a strange Elastic Search warning when putting a perfectly valid mapping · GitHub
(git://gist.github.com/861923.git)

On Mar 8, 5:48 pm, Shay Banon shay.ba...@elasticsearch.com wrote:

Heya,

Its not something that breaks the system, its just a warning that extra processing of mapping is done (which should not really be done). I simply need to fix it (the warning is there so if I miss something, it will bubble up through the users :slight_smile: ). Can you gist a recreation of this so it will be simpler for me to fix it? (Elasticsearch Platform — Find real-time answers at scale | Elastic)

-shay.banonOn Tuesday, March 8, 2011 at 5:15 PM, Jan Fiedler wrote:

I am seeing strange warnings (see below) when putting mappings

containing 'dynamic_templates'. The mapping seems perfectly right and
if you closely look at the warning below you find that only the order
of the 'match' and 'match_mapping_type' is different. Content wise the
mappings are the same. Is this a bug in Elastic Search? Is there
anything I can do on my end to avoid the warning (as it is badly
spamming my log files)?

2011-03-08 16:00:34,006 WARN
[elasticsearch[Fagin]clusterService#updateTask-pool-11-thread-1]
[org.elasticsearch.indices.cluster] - [Fagin] [test_index] parsed
mapping [test_type], and got different sources
original:
{"test_type":{"dynamic_templates":[{"template1":{"mapping":
{"index":"not_analyzed","type":"string"},"match_mapping_type":"string","mat ch":""}}],"properties":
{}}}
parsed:
{"test_type":{"dynamic_templates":[{"template1":{"mapping":
{"index":"not_analyzed","type":"string"},"match":"
","match_mapping_type":" string"}}],"properties":
{}}}