# ReduceSearchPhaseException caused by ClassCastException

**URL:** https://discuss.elastic.co/t/reducesearchphaseexception-caused-by-classcastexception/10779
**Category:** Elasticsearch
**Created:** [February 18, 2013, 5:16pm UTC](https://discuss.elastic.co/t/reducesearchphaseexception-caused-by-classcastexception/10779 "2013-02-18T17:16:42Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![cell](https://avatars.discourse-cdn.com/v4/letter/c/eada6e/32.png) [@cell](https://discuss.elastic.co/u/cell)
#### Post date: [February 18, 2013, 5:16pm UTC](https://discuss.elastic.co/t/reducesearchphaseexception-caused-by-classcastexception/10779/1 "2013-02-18T17:16:42Z")

</div>

Hi,

Elastic Search Version: 0.20.4

I have a field in my index which contains floating point data. In the  
mapping I can see that Elastic Search has correctly identified the data  
type as double. However when I try to run either a terms stats facet or a  
terms facet on this field, the following exception is thrown:

ReduceSearchPhaseException[Failed to execute phase [fetch], [reduce] ];  
nested:  
ClassCastException[org.elasticsearch.search.facet.terms.longs.InternalLongTermsFacet  
cannot be cast to  
org.elasticsearch.search.facet.terms.doubles.InternalDoubleTermsFacet];

Statistical facet works on the field though. I can also run terms facets on  
other floating point fields, so I am really confused as to why this  
particular field is behaving differently. Has anybody else run into this  
problem before?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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: [July 6, 2017, 2:50am UTC](https://discuss.elastic.co/t/reducesearchphaseexception-caused-by-classcastexception/10779/2 "2017-07-06T02:50:54Z")

</div>


