ElasticSearch is used to collect and search logs in a lot of systems, such as Kibana (http://www.elasticsearch.org/overview/kibana/ or http://kibana.org/) and logstash (http://www.elasticsearch.org/overview/logstash/ or http://logstash.net/). To improve searching in these scenarios, it provides the IPv4 type that can be used to store IP addresses in an optimized way.
You need to define the type of the field that contains an IP address as "ip"
.
Using the preceding order
example, you can extend it by adding the customer IP:
"customer_ip": { "type": "ip", "store": "yes" }
The IP must be in the standard point notation form, as shown in the following code:
"customer_ip":"19.18.200.201"