# Geodistance exception

**URL:** <https://discuss.elastic.co/t/geodistance-exception/20028>\
**Category:** Elasticsearch\
**Created:** [October 1, 2014, 2:49pm UTC](https://discuss.elastic.co/t/geodistance-exception/20028 "2014-10-01T14:49:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rcarlomagno](https://avatars.discourse-cdn.com/v4/letter/r/b5e925/32.png) [@rcarlomagno](https://discuss.elastic.co/u/rcarlomagno)\
**Post date:** [October 1, 2014, 2:49pm UTC](https://discuss.elastic.co/t/geodistance-exception/20028/1 "2014-10-01T14:49:22Z")

</div>

i have a object mapped as

> <https://gist.github.com/anonymous/ffab4216ff8f77cb6077>

lat and lon are inside inmueble.ubicacion.coordenada  
coordenada is geopoint type

when i query like

{  
"filtered" : {  
"query" : {  
"match\_all" : {}  
},  
"filter" : {  
"geo\_distance" : {  
"distance" : "12km"  
"inmueble.ubicacion.coordenada" : {  
"lat" : 40,  
"lon" : -70  
}  
}  
}  
}  
}

i receive an exception

{  
"error":"SearchPhaseExecutionException[Failed to execute phase [query],  
all shards failed; shardFailures {[uyTF-G\_USraZeAIlyewVLg][socprop-ar][3]:  
SearchParseException[[socprop-ar][3]: from[-1],size[-1]: Parse Failure  
[Failed to parse source [{\r\n "filtered" : {\r\n "query" :  
{\r\n "match\_all" : {}\r\n },\r\n "filter" :  
{\r\n "geo\_distance" : {\r\n "distance" :  
"12km"\r\n "inmueble.ubicacion.coordenada" : {\r\n  
"lat" : 40,\r\n "lon" : -70\r\n  
}\r\n }\r\n }\r\n }\r\n}\n]]]; nested:  
SearchParseException[[socprop-ar][3]: from[-1],size[-1]: Parse Failure [No  
parser for element [filtered]]]; }{[uyTF-G\_USraZeAIlyewVLg][socprop-ar][2]:  
SearchParseException[[socprop-ar][2]: from[-1],size[-1]: Parse Failure  
[Failed to parse source [{\r\n "filtered" : {\r\n "query" :  
{\r\n "match\_all" : {}\r\n },\r\n "filter" :  
{\r\n "geo\_distance" : {\r\n "distance" :  
"12km"\r\n "inmueble.ubicacion.coordenada" : {\r\n  
"lat" : 40,\r\n "lon" : -70\r\n  
}\r\n }\r\n }\r\n }\r\n}\n]]]; nested:  
SearchParseException[[socprop-ar][2]: from[-1],size[-1]: Parse Failure [No  
parser for element [filtered]]]; }{[uyTF-G\_USraZeAIlyewVLg][socprop-ar][1]:  
SearchParseException[[socprop-ar][1]: from[-1],size[-1]: Parse Failure  
[Failed to parse source [{\r\n "filtered" : {\r\n "query" :  
{\r\n "match\_all" : {}\r\n },\r\n "filter" :  
{\r\n "geo\_distance" : {\r\n "distance" :  
"12km"\r\n "inmueble.ubicacion.coordenada" : {\r\n  
"lat" : 40,\r\n "lon" : -70\r\n  
}\r\n }\r\n }\r\n }\r\n}\n]]]; nested:  
SearchParseException[[socprop-ar][1]: from[-1],size[-1]: Parse Failure [No  
parser for element [filtered]]]; }{[uyTF-G\_USraZeAIlyewVLg][socprop-ar][0]:  
SearchParseException[[socprop-ar][0]: from[-1],size[-1]: Parse Failure  
[Failed to parse source [{\r\n "filtered" : {\r\n "query" :  
{\r\n "match\_all" : {}\r\n },\r\n "filter" :  
{\r\n "geo\_distance" : {\r\n "distance" :  
"12km"\r\n "inmueble.ubicacion.coordenada" : {\r\n  
"lat" : 40,\r\n "lon" : -70\r\n  
}\r\n }\r\n }\r\n }\r\n}\n]]]; nested:  
SearchParseException[[socprop-ar][0]: from[-1],size[-1]: Parse Failure [No  
parser for element [filtered]]]; }{[uyTF-G\_USraZeAIlyewVLg][socprop-ar][4]:  
SearchParseException[[socprop-ar][4]: from[-1],size[-1]: Parse Failure  
[Failed to parse source [{\r\n "filtered" : {\r\n "query" :  
{\r\n "match\_all" : {}\r\n },\r\n "filter" :  
{\r\n "geo\_distance" : {\r\n "distance" :  
"12km"\r\n "inmueble.ubicacion.coordenada" : {\r\n  
"lat" : 40,\r\n "lon" : -70\r\n  
}\r\n }\r\n }\r\n }\r\n}\n]]]; nested:  
SearchParseException[[socprop-ar][4]: from[-1],size[-1]: Parse Failure [No  
parser for element [filtered]]]; }]",  
"status":400  
}

i think the problem is because my geopoint is nested right?

--  
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/b82dc35b-2dec-418e-848b-4aaece9fbd88%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b82dc35b-2dec-418e-848b-4aaece9fbd88%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, 12:58am UTC](https://discuss.elastic.co/t/geodistance-exception/20028/2 "2017-07-06T00:58:57Z")

</div>

Closed on July 6, 2017, 12:58am UTC


