Getting class_cast_exception for index pattern that is created based on two index

I have created the index pattern as df3df2* on two index(df3df2_snap and df3df2_raw). The data type mapping of the fields are String and Float. When I am looking for data of index df3df2*, i am getting error as

Error: Request to Elasticsearch failed: {"error":{"root_cause":[],"type":"search_phase_execution_exception","reason":"","phase":"fetch","grouped":true,"failed_shards":[],"caused_by":{"type":"class_cast_exception","reason":"java.lang.Float cannot be cast to java.lang.Long"}},"status":503}
KbnError@http://apsrs4858:5601/bundles/commons.bundle.js?v=16350:1:164770
RequestFailure@http://apsrs4858:5601/bundles/commons.bundle.js?v=16350:1:165502
callResponseHandlers/<@http://apsrs4858:5601/bundles/kibana.bundle.js?v=16350:53:623744
[4011]/</Promise.try@http://apsrs4858:5601/bundles/commons.bundle.js?v=16350:50:19131
[4011]/</Promise.map/<@http://apsrs4858:5601/bundles/commons.bundle.js?v=16350:50:18511
[4011]/</Promise.map@http://apsrs4858:5601/bundles/commons.bundle.js?v=16350:50:18476
callResponseHandlers@http://apsrs4858:5601/bundles/kibana.bundle.js?v=16350:53:623314
fetchSearchResults/<@http://apsrs4858:5601/bundles/kibana.bundle.js?v=16350:53:612685
processQueue@http://apsrs4858:5601/bundles/commons.bundle.js?v=16350:29:132456
scheduleProcessQueue/<@http://apsrs4858:5601/bundles/commons.bundle.js?v=16350:29:133349
$RootScopeProvider/this.$get</Scope.prototype.$digest@http://apsrs4858:5601/bundles/commons.bundle.js?v=16350:29:144239
$RootScopeProvider/this.$get</Scope.prototype.$apply@http://apsrs4858:5601/bundles/commons.bundle.js?v=16350:29:147007
done@http://apsrs4858:5601/bundles/commons.bundle.js?v=16350:29:100015
completeRequest@http://apsrs4858:5601/bundles/commons.bundle.js?v=16350:29:104697
createHttpBackend/</xhr.onload@http://apsrs4858:5601/bundles/commons.bundle.js?v=16350:29:105435

Any idea, what is the cause of this error?

Fields with data type is as below

{
"df3df2_raw": {
"mappings": {
"raw": {
"properties": {
"@timestamp": {
"type": "date"
},
"Date": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"EntNm": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"Raw_DF2": {
"type": "float"
},
"Raw_DF2DelFlag": {
"type": "float"
},
"Raw_DF2Delta": {
"type": "float"
},
"Raw_DF2Dup": {
"type": "float"
},
"Raw_DF2Match%": {
"type": "float"
},
"Raw_DF3": {
"type": "float"
},
"Raw_DF3Delta": {
"type": "float"
},
"Raw_DF3Dup": {
"type": "float"
},
"Raw_DF3Match%": {
"type": "float"
},
"Raw_Join": {
"type": "float"
},
"Source": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
}
},

"df3df2_snap": {
"mappings": {
"snap": {
"properties": {
"@timestamp": {
"type": "date"
},
"Date": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"EntNm": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"Snap_DF2": {
"type": "float"
},
"Snap_DF2DelFlag": {
"type": "float"
},
"Snap_DF2Delta": {
"type": "float"
},
"Snap_DF2Dup": {
"type": "float"
},
"Snap_DF2Match%": {
"type": "float"
},
"Snap_DF3": {
"type": "float"
},
"Snap_DF3Delta": {
"type": "float"
},
"Snap_DF3Dup": {
"type": "float"
},
"Snap_DF3Match%": {
"type": "float"
},
"Snap_Join": {
"type": "float"
},
"Source": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
}
}
}

So that error message is coming from Elasticsearch, which seems unhappy about the differences between the two indexes. I would suggest asking this question in the Elasticsearch forum where you will likely get a better answer.

Thanks Bill! I will put this question there.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.