I have elasticsearch index named as dataInfo-yyyy.mm.dd.
I am querying elasticsearch thru spark scala to get the data by searching index as dataInfo* and its throwing error as follows:
catch exceptionorg.elasticsearch.hadoop.EsHadoopIllegalArgumentException: Incompatible types found in multi-mapping: Field [fieldName] has conflicting types of [LONG] and [INTEGER]
if I am passing index as dataInfo-2019*, I am getting records from Elasticsearch.
when I do search just with info*, I am facing this issue.
Could you please suggest what might be causing this incompatible types?
I'm not sure but may be you did not force the mapping and let elasticsearch decide. In which case the decision which was based on the first document was maybe wrong.
You should probably create the right mapping instead.
Thank you for your quick response. I am new to elasticsearch and what do you mean by force the mapping? Can we force the mapping in elasticsearch and if yes, how can we do it.
In my spark code I am trying to read data from index dataInfo-* and getting following error:
catch exceptionorg.elasticsearch.hadoop.EsHadoopIllegalArgumentException: Incompatible types found in multi-mapping: Field [fieldName] has conflicting types of [LONG] and [INTEGER]
If I read data with index name as dataInfo-2019* , I am getting the data
My question is why its nor returning data when I do search with dataInfo-* and why it is throwing error.
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.