Package org.apache.lucene.document
Class BinaryRange
- java.lang.Object
-
- org.apache.lucene.document.Field
-
- org.apache.lucene.document.BinaryRange
-
- All Implemented Interfaces:
org.apache.lucene.index.IndexableField
public final class BinaryRange extends org.apache.lucene.document.FieldA range field for binary encoded ranges
-
-
Field Summary
Fields Modifier and Type Field Description static intBYTESThe number of bytes per dimension, useInetAddressPoint.BYTESas max, because that is maximum we need to support
-
Constructor Summary
Constructors Constructor Description BinaryRange(java.lang.String name, byte[] encodedRange)Create a new BinaryRange from a provided encoded binary range
-
Method Summary
Modifier and Type Method Description static org.apache.lucene.search.QuerynewIntersectsQuery(java.lang.String field, byte[] encodedRange)Create a query for matching indexed ip ranges thatINTERSECTthe defined range.-
Methods inherited from class org.apache.lucene.document.Field
binaryValue, fieldType, getCharSequenceValue, name, numericValue, readerValue, setBytesValue, setBytesValue, setByteValue, setDoubleValue, setFloatValue, setIntValue, setLongValue, setReaderValue, setShortValue, setStringValue, setTokenStream, stringValue, tokenStream, tokenStreamValue, toString
-
-
-
-
Field Detail
-
BYTES
public static final int BYTES
The number of bytes per dimension, useInetAddressPoint.BYTESas max, because that is maximum we need to support- See Also:
- Constant Field Values
-
-
Method Detail
-
newIntersectsQuery
public static org.apache.lucene.search.Query newIntersectsQuery(java.lang.String field, byte[] encodedRange)Create a query for matching indexed ip ranges thatINTERSECTthe defined range.- Parameters:
field- field name. must not be null.encodedRange- Encoded range- Returns:
- query for matching intersecting encoded ranges (overlap, within, crosses, or contains)
- Throws:
java.lang.IllegalArgumentException- iffieldis null,minormaxis invalid
-
-