# Find all the nearest points that lie near linestring data

**URL:** <https://discuss.elastic.co/t/find-all-the-nearest-points-that-lie-near-linestring-data/296400>\
**Category:** Elasticsearch\
**Created:** [February 6, 2022, 4:22pm UTC](https://discuss.elastic.co/t/find-all-the-nearest-points-that-lie-near-linestring-data/296400 "2022-02-06T16:22:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vaseem001](https://avatars.discourse-cdn.com/v4/letter/v/9fc348/32.png) [@vaseem001](https://discuss.elastic.co/u/vaseem001)\
**Post date:** [February 6, 2022, 4:22pm UTC](https://discuss.elastic.co/t/find-all-the-nearest-points-that-lie-near-linestring-data/296400/1 "2022-02-06T16:22:19Z")

</div>

Let's say I have an index of points and I query linestring data so how can I find the nearest point that lies near give linestring data

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [February 7, 2022, 1:58am UTC](https://discuss.elastic.co/t/find-all-the-nearest-points-that-lie-near-linestring-data/296400/2 "2022-02-07T01:58:08Z")

</div>

Hi @vaseem001 Welcome to the community!

Hmmm Looks like you can do a distance from a point to a line but not search distances of points from from a line and sort on the results.

I ping some folks from our maps / geo area see if the have a suggestion... you might need / want to open and feature request.

---

<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:** [March 7, 2022, 1:58am UTC](https://discuss.elastic.co/t/find-all-the-nearest-points-that-lie-near-linestring-data/296400/3 "2022-03-07T01:58:57Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
