# Can the Geo Distance filter take distance param of less than 1mi?

**URL:** <https://discuss.elastic.co/t/can-the-geo-distance-filter-take-distance-param-of-less-than-1mi/29747>\
**Category:** Elasticsearch\
**Created:** [September 22, 2015, 5:27am UTC](https://discuss.elastic.co/t/can-the-geo-distance-filter-take-distance-param-of-less-than-1mi/29747 "2015-09-22T05:27:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![brunomiranda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brunomiranda/32/746_2.png) [@brunomiranda](https://discuss.elastic.co/u/brunomiranda)\
**Post date:** [September 22, 2015, 5:27am UTC](https://discuss.elastic.co/t/can-the-geo-distance-filter-take-distance-param-of-less-than-1mi/29747/1 "2015-09-22T05:27:32Z")

</div>

In my case I am using 1mi (mile), I tried using 0.5mi but it doesn't return the correct results. Is the only solution to this to drop to a smaller distance unit?

---

<div class="post-metadata">

**Author:** ![mikemccand](https://avatars.discourse-cdn.com/v4/letter/m/f04885/32.png) [@mikemccand](https://discuss.elastic.co/u/mikemccand)\
**Post date:** [September 22, 2015, 10:05am UTC](https://discuss.elastic.co/t/can-the-geo-distance-filter-take-distance-param-of-less-than-1mi/29747/2 "2015-09-22T10:05:24Z")

</div>

Hmm, I peeked at the sources in ES master for GeoDistanceRangeQueryParser, and in ES 1.x for GeoDistanceFilterParser, and from what I can tell (looking at parseDistance in org/elasticsearch/common/unit/DistanceUnit$Distance), we parse the 0.5 to a double, so that query should have worked.

Mike McCandless

---

<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 5, 2017, 11:48pm UTC](https://discuss.elastic.co/t/can-the-geo-distance-filter-take-distance-param-of-less-than-1mi/29747/3 "2017-07-05T23:48:48Z")

</div>


