# \_geo\_distance search exception

**URL:** <https://discuss.elastic.co/t/-geo-distance-search-exception/14305>\
**Category:** Elasticsearch\
**Created:** [November 7, 2013, 3:26pm UTC](https://discuss.elastic.co/t/-geo-distance-search-exception/14305 "2013-11-07T15:26:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexandre\_Spaeth](https://avatars.discourse-cdn.com/v4/letter/a/34f0e0/32.png) [@Alexandre\_Spaeth](https://discuss.elastic.co/u/Alexandre_Spaeth)\
**Post date:** [November 7, 2013, 3:26pm UTC](https://discuss.elastic.co/t/-geo-distance-search-exception/14305/1 "2013-11-07T15:26:28Z")

</div>

Hello all,

I'm using haystack with Elasticsearch for quite a while now and everything  
is going great.  
I recently upgraded from 0.20 to 0.90.6 on my staging server and my  
distance sorting doesn't work anymore.

I'm having a:  
ClassCastException[org.elasticsearch.index.fielddata.plain.PagedBytesIndexFieldData  
cannot be cast to org.elasticsearch.index.fielddata.IndexGeoPointFieldData]

The exact same code seems to work on my own laptop, except I'm using  
Archlinux on it and Ubuntu on the server.

Here is my gist:

> <https://gist.github.com/Alexerson/7356362>

I probably forgot something somewhere but I can't figure what...  
If you need anything more then that to help me figure it out, just ask.

Thanks,  
Alexandre

--  
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:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [November 14, 2013, 10:16am UTC](https://discuss.elastic.co/t/-geo-distance-search-exception/14305/2 "2013-11-14T10:16:53Z")

</div>

Hey,

can you help us recreate that issue by creating a full gist using curl  
including indexing data, setting up mapping and create a github issue?  
Would like to investigate this further.

--Alex

On Thu, Nov 7, 2013 at 4:26 PM, Alexandre Spaeth \<[alexandre.spaeth@gmail.com](mailto:alexandre.spaeth@gmail.com)

> wrote:

> Hello all,
> 
> I'm using haystack with Elasticsearch for quite a while now and everything  
> is going great.  
> I recently upgraded from 0.20 to 0.90.6 on my staging server and my  
> distance sorting doesn't work anymore.
> 
> I'm having a:  
> ClassCastException[org.elasticsearch.index.fielddata.plain.PagedBytesIndexFieldData  
> cannot be cast to org.elasticsearch.index.fielddata.IndexGeoPointFieldData]
> 
> The exact same code seems to work on my own laptop, except I'm using  
> Archlinux on it and Ubuntu on the server.
> 
> Here is my gist:
> 
> [ElasticSearch \_geo\_distance sort error. · GitHub](https://gist.github.com/Alexerson/7356362)
> 
> I probably forgot something somewhere but I can't figure what...  
> If you need anything more then that to help me figure it out, just ask.
> 
> Thanks,  
> Alexandre
> 
> --  
> 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).

--  
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:07am UTC](https://discuss.elastic.co/t/-geo-distance-search-exception/14305/3 "2017-07-06T02:07:07Z")

</div>


