newPrefixQuery

fun newPrefixQuery(field: String, value: InetAddress, prefixLength: Int): Query

Create a prefix query for matching a CIDR network range.

Return

a query matching documents with addresses contained within this network

Parameters

field

field name. must not be null.

value

any host address

prefixLength

the network prefix length for this address. This is also known as the subnet mask in the context of IPv4 addresses.

Throws

if field is null, or prefixLength is invalid.