# Query range IP

**URL:** <https://discuss.elastic.co/t/query-range-ip/158887>\
**Category:** Elasticsearch\
**Created:** [November 30, 2018, 10:32am UTC](https://discuss.elastic.co/t/query-range-ip/158887 "2018-11-30T10:32:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pascal1](https://avatars.discourse-cdn.com/v4/letter/p/838e76/32.png) [@Pascal1](https://discuss.elastic.co/u/Pascal1)\
**Post date:** [November 30, 2018, 10:32am UTC](https://discuss.elastic.co/t/query-range-ip/158887/1 "2018-11-30T10:32:24Z")

</div>

Hello everyone,  
The situation is as follows:  
I retrieve logs containing IP.  
In an index I have IP ranges that have names.  
I would like to search my index to see if my IP belongs to a range and if so, retrieve the name of that range to add it.

In my logstash file I created an elasticsearch filter that searches my index.  
But I don't know how to build the query.

Thanks for your help

Pascal

---

<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:** [December 28, 2018, 10:32am UTC](https://discuss.elastic.co/t/query-range-ip/158887/2 "2018-12-28T10:32:25Z")

</div>

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