# Getting class\_cast\_exception for index pattern that is created based on two index

**URL:** <https://discuss.elastic.co/t/getting-class-cast-exception-for-index-pattern-that-is-created-based-on-two-index/130217>\
**Category:** Kibana\
**Created:** [May 2, 2018, 9:42am UTC](https://discuss.elastic.co/t/getting-class-cast-exception-for-index-pattern-that-is-created-based-on-two-index/130217 "2018-05-02T09:42:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sjain135](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@sjain135](https://discuss.elastic.co/u/sjain135)\
**Post date:** [May 2, 2018, 9:42am UTC](https://discuss.elastic.co/t/getting-class-cast-exception-for-index-pattern-that-is-created-based-on-two-index/130217/1 "2018-05-02T09:42:00Z")

</div>

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](http://apsrs4858:5601/bundles/commons.bundle.js?v=16350:1:164770)  
RequestFailure@[http://apsrs4858:5601/bundles/commons.bundle.js?v=16350:1:165502](http://apsrs4858:5601/bundles/commons.bundle.js?v=16350:1:165502)  
callResponseHandlers/\<@[http://apsrs4858:5601/bundles/kibana.bundle.js?v=16350:53:623744](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](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](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](http://apsrs4858:5601/bundles/commons.bundle.js?v=16350:50:18476)  
callResponseHandlers@[http://apsrs4858:5601/bundles/kibana.bundle.js?v=16350:53:623314](http://apsrs4858:5601/bundles/kibana.bundle.js?v=16350:53:623314)  
fetchSearchResults/\<@[http://apsrs4858:5601/bundles/kibana.bundle.js?v=16350:53:612685](http://apsrs4858:5601/bundles/kibana.bundle.js?v=16350:53:612685)  
processQueue@[http://apsrs4858:5601/bundles/commons.bundle.js?v=16350:29:132456](http://apsrs4858:5601/bundles/commons.bundle.js?v=16350:29:132456)  
scheduleProcessQueue/\<@[http://apsrs4858:5601/bundles/commons.bundle.js?v=16350:29:133349](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](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](http://apsrs4858:5601/bundles/commons.bundle.js?v=16350:29:147007)  
done@[http://apsrs4858:5601/bundles/commons.bundle.js?v=16350:29:100015](http://apsrs4858:5601/bundles/commons.bundle.js?v=16350:29:100015)  
completeRequest@[http://apsrs4858:5601/bundles/commons.bundle.js?v=16350:29:104697](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](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  
}  
}  
}  
}  
}  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![Bill\_McConaghy](https://avatars.discourse-cdn.com/v4/letter/b/ed655f/32.png) [@Bill\_McConaghy](https://discuss.elastic.co/u/Bill_McConaghy)\
**Post date:** [May 2, 2018, 12:43pm UTC](https://discuss.elastic.co/t/getting-class-cast-exception-for-index-pattern-that-is-created-based-on-two-index/130217/2 "2018-05-02T12:43:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sjain135](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@sjain135](https://discuss.elastic.co/u/sjain135)\
**Post date:** [May 3, 2018, 6:05am UTC](https://discuss.elastic.co/t/getting-class-cast-exception-for-index-pattern-that-is-created-based-on-two-index/130217/3 "2018-05-03T06:05:10Z")

</div>

Thanks Bill! I will put this question there.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 31, 2018, 6:05am UTC](https://discuss.elastic.co/t/getting-class-cast-exception-for-index-pattern-that-is-created-based-on-two-index/130217/4 "2018-05-31T06:05:10Z")

</div>

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