SO i've tried to find an answer to this and i've had no luck in finding the answer. I want to store an IP range such as '5.10.89.104', '5.10.89.107' and then be able to search for data associated within the particular range. so lets say that if i search for 5.10.89.106 the document associated with that range will show up.
I can find a ton of stuff looking up a range but nothing about storing a range
Well, you could create a range query with the IPs and register it in the .percolator on your index, then match the document with the single IP address against the registered queries.
There are some ongoing developments in Lucene about adding the ability to index ranges, which will probably get exposed in elasticsearch at some point: https://issues.apache.org/jira/browse/LUCENE-7381
Hi! Why don't create two fields IP_START and IP_END to store start and end of range?
In search query you can compare your IP with it (documentation say that IP stores as long internally so it easyly comparable like numbers).
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.