[quote="AKASH_DUBEY1, post:20, topic:257781"]
```
{
"size": 10,
"query": {
"bool": {
"must": [
{
"range": {
"ipFromLong": {
"from": 28147177551,
"to": null,
"include_lower": true,
"include_upper": false,
"boost": 1
}
}
},
{
"range": {
"ipToLong": {
"from": null,
"to": 28147177551,
"include_lower": false,
"include_upper": true,
"boost": 1
}
}
}
],
"adjust_pure_negative": true,
"boost": 1
}
}
}
```
[/quote]
In given query I tried all possible combination already nathing worked and ipToLong and ipForLong are just long variable then what do u mean by intervals here and again I tried all combination include_lower and include_upper .one more thing ,putting my point again If you run this clauses of range in two different bool queries this works and I menton again both are different fields if you run in single then doesn't so fliping should have no mean with it.