org.apache.lucene.index.IndexableField
public final class BinaryRange
extends org.apache.lucene.document.Field
Modifier and Type | Field | Description |
---|---|---|
static int |
BYTES |
The number of bytes per dimension, use
InetAddressPoint.BYTES as max, because that is maximum we need to support |
Constructor | Description |
---|---|
BinaryRange(java.lang.String name,
byte[] encodedRange) |
Create a new BinaryRange from a provided encoded binary range
|
Modifier and Type | Method | Description |
---|---|---|
static org.apache.lucene.search.Query |
newIntersectsQuery(java.lang.String field,
byte[] encodedRange) |
Create a query for matching indexed ip ranges that
INTERSECT the defined range. |
binaryValue, fieldType, name, numericValue, readerValue, setBytesValue, setBytesValue, setByteValue, setDoubleValue, setFloatValue, setIntValue, setLongValue, setReaderValue, setShortValue, setStringValue, setTokenStream, stringValue, tokenStream, tokenStreamValue, toString
public static final int BYTES
InetAddressPoint.BYTES
as max, because that is maximum we need to supportpublic BinaryRange(java.lang.String name, byte[] encodedRange)
name
- field name. must not be null.encodedRange
- Encoded rangepublic static org.apache.lucene.search.Query newIntersectsQuery(java.lang.String field, byte[] encodedRange)
INTERSECT
the defined range.field
- field name. must not be null.encodedRange
- Encoded rangejava.lang.IllegalArgumentException
- if field
is null, min
or max
is invalid