Implementation of a Complex Conditional Query

Hello Everyone , I am new to the implementation of such complex query and need help, Kindly do the favour.

In our Database we have documnets having IP address as a field ( with other additional information), Now I want to fetch all the IP addresses that belongs to some particular IP address pool (that I will provide).

For Example : Input pool =
Now I have different IPs in our database like,, , So I want to filter these IPs, beacause these IPs belongs to my desired IP pool.
As per our approach,
RESULT should be true of ip belongs to the pool else false.

So now is there any type of query through which we can implement this type of complex approach
for ex: In bool query:
so as you can see in place of "field" parameter i used a conditional statement.

Is there any other approach to implement this kind of query or please do tell us that are we going in right direction?

This sounds as if the existing functionality when using the ip datatype supports the CIDR range queries that you are after.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.