I have an index with this mapping:
{
"iprange_index": {
"mappings": {
"properties": {
"iplist": {
"type": "ip_range"
}
}
}
}
}
Now I want to do the following query using query string query.
{
"query": {
"range": {
"iplist": {
"gte": "12.168.1.0",
"lte": "12.168.1.255",
"relation":"contains"
}
}
}
}
Something like this:
{
"query": {
"query_string": {
"query": "iplist:[12.168.1.0 TO 12.168.1.255]"
}
}
}
But I don't know how to incorporate "relation":"contains" in query string query above. Can we do this?