# Geo Distance Facet - ElasticsearchParseException

**URL:** <https://discuss.elastic.co/t/geo-distance-facet-elasticsearchparseexception/17919>\
**Category:** Elasticsearch\
**Created:** [June 5, 2014, 8:37am UTC](https://discuss.elastic.co/t/geo-distance-facet-elasticsearchparseexception/17919 "2014-06-05T08:37:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Munjal\_Dhamecha](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@Munjal\_Dhamecha](https://discuss.elastic.co/u/Munjal_Dhamecha)\
**Post date:** [June 5, 2014, 8:37am UTC](https://discuss.elastic.co/t/geo-distance-facet-elasticsearchparseexception/17919/1 "2014-06-05T08:37:13Z")

</div>

Hello All,

I've been facing problem with geo\_distance facet since few hours.

Error is: ElasticsearchParseException[field must be either 'lat', 'lon' or  
'geohash']

I am not sure, if this is bug or I am making a silly mistake here. Please  
guide in right direction.

Gist: [https://gist.github.com/mastermunj/a58298bc56615b54d643](https://gist.github.com/mastermunj/a58298bc56615b54d643)

Tested On: 1.2.0, 1.2.1

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/6ec869ad-c32a-4e85-ab60-131bca8623fb%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6ec869ad-c32a-4e85-ab60-131bca8623fb%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [June 16, 2014, 12:27pm UTC](https://discuss.elastic.co/t/geo-distance-facet-elasticsearchparseexception/17919/2 "2014-06-16T12:27:29Z")

</div>

Hey,

your ranges specification is broken, you need to use an array of objects.  
Also, please try to use aggregations if possible, as they are the successor  
of facets.

--Alex

On Thu, Jun 5, 2014 at 10:37 AM, Munjal Dhamecha [mastermunj@gmail.com](mailto:mastermunj@gmail.com)  
wrote:

> Hello All,
> 
> I've been facing problem with geo\_distance facet since few hours.
> 
> Error is: ElasticsearchParseException[field must be either 'lat', 'lon' or  
> 'geohash']
> 
> I am not sure, if this is bug or I am making a silly mistake here. Please  
> guide in right direction.
> 
> Gist: [ElasticsearchParseException[field must be either 'lat', 'lon' or 'geohash'] · GitHub](https://gist.github.com/mastermunj/a58298bc56615b54d643)
> 
> Tested On: 1.2.0, 1.2.1
> 
> --  
> 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).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/6ec869ad-c32a-4e85-ab60-131bca8623fb%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6ec869ad-c32a-4e85-ab60-131bca8623fb%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/6ec869ad-c32a-4e85-ab60-131bca8623fb%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/6ec869ad-c32a-4e85-ab60-131bca8623fb%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAGCwEM\_wd8EctDuvpA7T-89O7P5Pjhk2oYhgqh5tAcDMMJL%2BQg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM_wd8EctDuvpA7T-89O7P5Pjhk2oYhgqh5tAcDMMJL%2BQg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Munjal\_Dhamecha](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@Munjal\_Dhamecha](https://discuss.elastic.co/u/Munjal_Dhamecha)\
**Post date:** [June 16, 2014, 12:31pm UTC](https://discuss.elastic.co/t/geo-distance-facet-elasticsearchparseexception/17919/3 "2014-06-16T12:31:36Z")

</div>

Oops! That one was very silly overlook mistake. Thank you for pointing it  
out.

Yes, I moved to aggregations with few failed tries on facets.

On Monday, 16 June 2014 17:57:34 UTC+5:30, Alexander Reelsen wrote:

> Hey,
> 
> your ranges specification is broken, you need to use an array of objects.  
> Also, please try to use aggregations if possible, as they are the successor  
> of facets.
> 
> --Alex
> 
> On Thu, Jun 5, 2014 at 10:37 AM, Munjal Dhamecha \<[maste...@gmail.com](mailto:maste...@gmail.com)  
> \<javascript:\>\> wrote:
> 
> > Hello All,
> > 
> > I've been facing problem with geo\_distance facet since few hours.
> > 
> > Error is: ElasticsearchParseException[field must be either 'lat', 'lon'  
> > or 'geohash']
> > 
> > I am not sure, if this is bug or I am making a silly mistake here. Please  
> > guide in right direction.
> > 
> > Gist: [ElasticsearchParseException[field must be either 'lat', 'lon' or 'geohash'] · GitHub](https://gist.github.com/mastermunj/a58298bc56615b54d643)
> > 
> > Tested On: 1.2.0, 1.2.1
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/6ec869ad-c32a-4e85-ab60-131bca8623fb%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6ec869ad-c32a-4e85-ab60-131bca8623fb%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/6ec869ad-c32a-4e85-ab60-131bca8623fb%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/6ec869ad-c32a-4e85-ab60-131bca8623fb%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/bf1cc3b1-f900-4e65-a113-cf22a6778f56%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/bf1cc3b1-f900-4e65-a113-cf22a6778f56%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:22am UTC](https://discuss.elastic.co/t/geo-distance-facet-elasticsearchparseexception/17919/4 "2017-07-06T01:22:10Z")

</div>


