# Queries on "ip\_range" type (missing documentation)

**URL:** <https://discuss.elastic.co/t/queries-on-ip-range-type-missing-documentation/246445>\
**Category:** Elasticsearch\
**Created:** [August 26, 2020, 11:33am UTC](https://discuss.elastic.co/t/queries-on-ip-range-type-missing-documentation/246445 "2020-08-26T11:33:30Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![whatgeorgemade](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/whatgeorgemade/32/103246_2.png) [@whatgeorgemade](https://discuss.elastic.co/u/whatgeorgemade)\
**Post date:** [September 2, 2020, 9:00am UTC](https://discuss.elastic.co/t/queries-on-ip-range-type-missing-documentation/246445/3 "2020-09-02T09:00:28Z")

</div>

An `ip_range` field can be treated in the same way as any other `range` type field. See the docs [here](https://www.elastic.co/guide/en/elasticsearch/reference/7.9/query-dsl-range-query.html). The field value will be a network.

One thing to remember with `ip_range` fields is that if a document contains the range `0.0.0.0/0`, it will match all queries.

You can find documents where the `ip_range` field contains a certain IP address using the `match` query. For example:

```auto
{
  "query": {
    "iprangefield": {
      "addr": "192.168.1.17"
    }
  }
}

```

You can also use a `range` query to see if document contains another network. For example:

```auto
{
  "query": {
    "range": {
      "iprangefield": {
        "from": "192.168.1.10",
        "to": "192.168.1.15"
      }
    }
  }
}

```

---

_[View the full topic](https://discuss.elastic.co/t/queries-on-ip-range-type-missing-documentation/246445)._
