# How set IP address type on selected fields

**URL:** <https://discuss.elastic.co/t/how-set-ip-address-type-on-selected-fields/253220>\
**Category:** Logstash\
**Created:** [October 24, 2020, 7:57pm UTC](https://discuss.elastic.co/t/how-set-ip-address-type-on-selected-fields/253220 "2020-10-24T19:57:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cyberzlo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cyberzlo/32/65490_2.png) [@cyberzlo](https://discuss.elastic.co/u/cyberzlo)\
**Post date:** [October 24, 2020, 7:57pm UTC](https://discuss.elastic.co/t/how-set-ip-address-type-on-selected-fields/253220/1 "2020-10-24T19:57:51Z")

</div>

My data incoming in json and IP is always on few fields, how can I set on this fields IP address type to query this fields via CIDR notation etc?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [October 24, 2020, 8:03pm UTC](https://discuss.elastic.co/t/how-set-ip-address-type-on-selected-fields/253220/2 "2020-10-24T20:03:14Z")

</div>

logstash does not an IP type. You will need to use an [index template](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-templates.html) in elasticsearch.

---

<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:** [November 21, 2020, 8:03pm UTC](https://discuss.elastic.co/t/how-set-ip-address-type-on-selected-fields/253220/3 "2020-11-21T20:03:30Z")

</div>

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