# Geoquery Against Pre-Indexed Shape is Failing

**URL:** https://discuss.elastic.co/t/geoquery-against-pre-indexed-shape-is-failing/21130
**Category:** Elasticsearch
**Created:** [December 8, 2014, 3:56am UTC](https://discuss.elastic.co/t/geoquery-against-pre-indexed-shape-is-failing/21130 "2014-12-08T03:56:42Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Waldo\_Jaquith](https://avatars.discourse-cdn.com/v4/letter/w/77aa72/32.png) [@Waldo\_Jaquith](https://discuss.elastic.co/u/Waldo_Jaquith)
#### Post date: [December 8, 2014, 3:56am UTC](https://discuss.elastic.co/t/geoquery-against-pre-indexed-shape-is-failing/21130/1 "2014-12-08T03:56:42Z")

</div>

Folks,

I’m trying to run a geo\_shape filter query using a pre-indexed shape, and it’s failing for reasons that I cannot identify. This is with Elasticsearch v1.4.1-1. I’ve documented how to reproduce the problem at [https://gist.github.com/waldoj/004f77755179d862fe3a](https://gist.github.com/waldoj/004f77755179d862fe3a).

The pre-indexed shapes are GeoJSON converted from Census Bureau municipal geodata. The indexed documents are state corporate registration records, each of which have an address that I’ve geocoded into a latitude and longitude (a field named “location”). The indexed shapes are in a "geometry”:{ “coordinates": { [1, 2] [3, 5] } } format. In the query I specify "path": “geometry”, which generates this error:

"Failed to find geo\_shape field [location]].”

Based on the error, it looks like Elasticsearch is looking for _shapes_ that fall within the pre-indexed shape, rather than _points_, and so while the indexed documents have a geo\_point field named “location,” there’s no geo\_shape field of that name. FWIW, I’m following the instructions in the manual at [http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-geo-shape-filter.html#\_pre\_indexed\_shape](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-geo-shape-filter.html#_pre_indexed_shape).

I’d be grateful to anybody who could offer some guidance. Thank you.

Best,  
Waldo

* * *

Waldo Jaquith  
Director  
U.S. Open Data Institute

> **[Open Data Institute](https://theodi.org)**
>
> The Open Data Institute (ODI) equip, connect and inspire people around the world to innovate with data. Co-founded by Sir Tim Berners-Lee and Sir Nigel Shadbolt, the ODI provides events, training, membership and consultancy around open data.

  
202-719-5315

--  
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/69F9EFA2-DF56-474D-8120-F5DBF0CA3877%40usodi.org](https://groups.google.com/d/msgid/elasticsearch/69F9EFA2-DF56-474D-8120-F5DBF0CA3877%40usodi.org).  
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:45am UTC](https://discuss.elastic.co/t/geoquery-against-pre-indexed-shape-is-failing/21130/2 "2017-07-06T00:45:08Z")

</div>


