Strange warning when putting mappings


(Jan Fiedler) #1

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":
{}}}


(Shay Banon) #2

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? (http://www.elasticsearch.org/help)

-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":
{}}}


(Jan Fiedler) #3

Created curl based recreation here: https://gist.github.com/861923
(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? (http://www.elasticsearch.org/help)

-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":
{}}}


(Shay Banon) #4

Thanks!, pushed a fix: https://github.com/elasticsearch/elasticsearch/issues/764#issue/764.
On Wednesday, March 9, 2011 at 11:22 AM, Jan Fiedler wrote:

Created curl based recreation here: https://gist.github.com/861923
(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? (http://www.elasticsearch.org/help)

-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":
{}}}


(system) #5