The ip field type doesn't support a subnet, only just the ipv4 address.
What do you want to do with storing also the subnet? If your goal is to
store all ip addresses that fall into the specified subnet, then I think
this would be a nice addition to the ip field type.
You can convert the ip from 4 octets to a number and store the number.
Then you can use a library (or write your own code) that gets the minimum
value and maximum value out of a subnet. Then you do a range query with
those numbers.
An IP address is just a number and a subnet is just a range.
On Sunday, September 8, 2013 8:50:47 AM UTC-4, Gabriele Angeli wrote:
Hi guys,
i've a question for you. I know that in ES is possible make a search
query with ip range,
but is possible to put the subnet mask in this query?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.