# Geoshape Filters via Java API

**URL:** <https://discuss.elastic.co/t/geoshape-filters-via-java-api/16412>\
**Category:** Elasticsearch\
**Created:** [March 17, 2014, 10:27pm UTC](https://discuss.elastic.co/t/geoshape-filters-via-java-api/16412 "2014-03-17T22:27:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yeroc\_2](https://avatars.discourse-cdn.com/v4/letter/y/9de053/32.png) [@Yeroc\_2](https://discuss.elastic.co/u/Yeroc_2)\
**Post date:** [March 17, 2014, 10:27pm UTC](https://discuss.elastic.co/t/geoshape-filters-via-java-api/16412/1 "2014-03-17T22:27:55Z")

</div>

All,

We're upgrading to v1.0 from v0.90 and have run into an issue we're not  
sure how to resolve. We have been applying the geoshape filter in our  
queries via the Java API using:

FilterBuilders.geoShapeFilter(fieldName, shape);

but now in v1.0 we can no longer pass in a Shape to the geoshape filter  
builder but instead it can take a ShapeBuilder only. The problem is we  
already have a Shape instance and it appears all the ShapeBuilder options  
that are available are only good for manually creating a Shape instance or  
but there no longer seems to be a way to apply a Shape object directly as a  
geoshape filter? Is there some way to achieve this easily that I'm  
missing?

Also, the relevant examples in the documentation  
at [http://www.elasticsearch.org/guide/en/elasticsearch/client/java-api/current/query-dsl-filters.html](http://www.elasticsearch.org/guide/en/elasticsearch/client/java-api/current/query-dsl-filters.html)  
still show the old API. This is also not noted in the breaking changes  
section of the v1.0 documentation.

Thanks,  
Corey

--  
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/b02078e0-c63f-4c1a-8357-317366583847%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b02078e0-c63f-4c1a-8357-317366583847%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:42am UTC](https://discuss.elastic.co/t/geoshape-filters-via-java-api/16412/2 "2017-07-06T01:42:40Z")

</div>

Closed on July 6, 2017, 1:42am UTC


