public class InetAddressRange extends Field
This field indexes an InetAddress range defined as a min/max pairs. It is single
dimension only (indexed as two 16 byte paired values).
Multiple values are supported.
This field defines the following static factory methods for common search operations over Ip Ranges
newIntersectsQuery() matches ip ranges that intersect the defined search range.
newWithinQuery() matches ip ranges that are within the defined search range.
newContainsQuery() matches ip ranges that contain the defined search range.
newCrossesQuery() matches ip ranges that cross the defined search range
Field.Store| Modifier and Type | Field and Description |
|---|---|
static int |
BYTES
The number of bytes per dimension : sync w/
InetAddressPoint |
boost, fieldsData, name, tokenStream, type| Constructor and Description |
|---|
InetAddressRange(String name,
InetAddress min,
InetAddress max)
Create a new InetAddressRange from min/max value
|
| Modifier and Type | Method and Description |
|---|---|
static Query |
newContainsQuery(String field,
InetAddress min,
InetAddress max)
Create a query for matching indexed ip ranges that
CONTAINS the defined range. |
static Query |
newCrossesQuery(String field,
InetAddress min,
InetAddress max)
Create a query for matching indexed ip ranges that
CROSS the defined range. |
static Query |
newIntersectsQuery(String field,
InetAddress min,
InetAddress max)
Create a query for matching indexed ip ranges that
INTERSECT the defined range. |
static Query |
newWithinQuery(String field,
InetAddress min,
InetAddress max)
Create a query for matching indexed ip ranges that are
WITHIN the defined range. |
void |
setRangeValues(InetAddress min,
InetAddress max)
Change (or set) the min/max values of the field.
|
binaryValue, boost, fieldType, name, numericValue, readerValue, setBoost, setBytesValue, setBytesValue, setByteValue, setDoubleValue, setFloatValue, setIntValue, setLongValue, setReaderValue, setShortValue, setStringValue, setTokenStream, stringValue, tokenStream, tokenStreamValue, toStringpublic static final int BYTES
InetAddressPointpublic InetAddressRange(String name, InetAddress min, InetAddress max)
name - field name. must not be null.min - range min value; defined as an InetAddressmax - range max value; defined as an InetAddresspublic void setRangeValues(InetAddress min, InetAddress max)
min - range min value; defined as an InetAddressmax - range max value; defined as an InetAddresspublic static Query newIntersectsQuery(String field, InetAddress min, InetAddress max)
INTERSECT the defined range.field - field name. must not be null.min - range min value; provided as an InetAddressmax - range max value; provided as an InetAddressIllegalArgumentException - if field is null, min or max is invalidpublic static Query newContainsQuery(String field, InetAddress min, InetAddress max)
CONTAINS the defined range.field - field name. must not be null.min - range min value; provided as an InetAddressmax - range max value; provided as an InetAddressIllegalArgumentException - if field is null, min or max is invalidpublic static Query newWithinQuery(String field, InetAddress min, InetAddress max)
WITHIN the defined range.field - field name. must not be null.min - range min value; provided as an InetAddressmax - range max value; provided as an InetAddressIllegalArgumentException - if field is null, min or max is invalidpublic static Query newCrossesQuery(String field, InetAddress min, InetAddress max)
CROSS the defined range.field - field name. must not be null.min - range min value; provided as an InetAddressmax - range max value; provided as an InetAddressIllegalArgumentException - if field is null, min or max is invalidCopyright © 2000-2018 Apache Software Foundation. All Rights Reserved.