I'm seeing that duplicate fields (same exact name) are allowed/created in my mapping.
Background: I'm running ES 1.7.2, and I created a template that causes mappings (with a certain name, in a certain index) to have a specific field as a "double" data type. This works fine. I've tested that out. So, as documents are saved, that field is populated properly (BUT only if the field is numeric and not-quoted).
BUT, if I pass in a "2", or anything quoted, I'm seeing a duplicate field is created in my mapping (with the same exact name) with data type "string". I didn't think that was possible in ES. Is there a way to prevent that?
The reason I added the template in the first place was to force the field's data type.
I want fields to be created dynamically. The only catch is, for a very small subset I need to specify the data type. The template approach seems like the best way to do that (per the template docs, to do just this). But the problem I'm facing (that I'm curious, might be a bug) is that even though that works as expected, ES is allowing duplicate field names with different data types (one from the explicit data type defined for that field in the template, and one from a dynamic determination).
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.