assuming documents that have an object type defining an ip address range,
what would be the recommended way to retrieve documents for which the ip
range(s) contain a given ip address.
assuming documents that have an object type defining an ip address
range, what would be the recommended way to retrieve documents for
which the ip range(s) contain a given ip address.
One thing - you map your field as "ip_range" then you index your docs as
"ip_ranges" (with an "s"). I'm assuming that was an error and you you
only have a single ip_range per doc. If you have multiple ip_ranges,
then you will need to change the mapping from type "object" to type
"nested" and use a nested filter instead.
thanks for the help! We actually may have multiple ip ranges, so your tip
about using the nested type & filter is appreciated! I tried it and it
works, so thanks again.
Best regards,
Sylvain
On Wednesday, November 14, 2012 8:13:24 PM UTC+1, Clinton Gormley wrote:
Hi Sylvain
assuming documents that have an object type defining an ip address
range, what would be the recommended way to retrieve documents for
which the ip range(s) contain a given ip address.
One thing - you map your field as "ip_range" then you index your docs as
"ip_ranges" (with an "s"). I'm assuming that was an error and you you
only have a single ip_range per doc. If you have multiple ip_ranges,
then you will need to change the mapping from type "object" to type
"nested" and use a nested filter instead.
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.