JSON data type.......................................Elasticsearch data type
string........................................................ Either a date field (if the value passes date detection), a double or long field (if the value passes numeric detection) or a text field, with a keyword sub-field.
My understanding is that the default will be double or long.
However in the same page later on, the section on Numeric Detection has an example where it is said:
Here is what the documentation is saying on the numeric types:
long -> A signed 64-bit integer
double -> A double-precision 64-bit IEEE 754 floating point number
float -> A single-precision 32-bit IEEE 754 floating point number
And it is here I am getting confused. It should have detected it as a long or double. But it detected it as float.
Should the documentation for Dynamic field mapping say that it can be detected as long, double or float?
The documentation is saying:
string -> Either a date field (if the value passes date detection), a double or long field (if the value passes numeric detection) or a text field, with a keyword sub-field.
There is no mention of the fact that it will strive to choose the smallest "size".
I know it might look like splitting the hair but I am getting tripped with error Bad Request: [status_exception] cannot merge mappings because of differences for field
while creating a Analytics Job.
The data is monthly data and I see that for some months the data is mapped a double and for others as float. Hence the question.
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.