Package org.apache.lucene.facet.taxonomy
Class IntAssociationFacetField
- java.lang.Object
-
- org.apache.lucene.document.Field
-
- org.apache.lucene.facet.taxonomy.AssociationFacetField
-
- org.apache.lucene.facet.taxonomy.IntAssociationFacetField
-
- All Implemented Interfaces:
IndexableField
public class IntAssociationFacetField extends AssociationFacetField
Add an instance of this to yourDocumentto add a facet label associated with an int. UseTaxonomyFacetSumIntAssociationsto aggregate int values per facet label at search time.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.document.Field
Field.Index, Field.Store, Field.TermVector
-
-
Field Summary
-
Fields inherited from class org.apache.lucene.facet.taxonomy.AssociationFacetField
assoc, dim, path, TYPE
-
-
Constructor Summary
Constructors Constructor Description IntAssociationFacetField(int assoc, java.lang.String dim, java.lang.String... path)Creates this fromdimandpathand an int association
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static intbytesRefToInt(BytesRef b)Decodes a previously encodedint.static BytesRefintToBytesRef(int v)Encodes anintas a 4-byteBytesRef, big-endian.java.lang.StringtoString()Prints a Field for human consumption.-
Methods inherited from class org.apache.lucene.document.Field
binaryValue, boost, fieldType, name, numericValue, readerValue, setBoost, setBytesValue, setBytesValue, setByteValue, setDoubleValue, setFloatValue, setIntValue, setLongValue, setReaderValue, setShortValue, setStringValue, setTokenStream, stringValue, tokenStream, tokenStreamValue, translateFieldType
-
-
-
-
Method Detail
-
intToBytesRef
public static BytesRef intToBytesRef(int v)
Encodes anintas a 4-byteBytesRef, big-endian.
-
bytesRefToInt
public static int bytesRefToInt(BytesRef b)
Decodes a previously encodedint.
-
toString
public java.lang.String toString()
Description copied from class:FieldPrints a Field for human consumption.- Overrides:
toStringin classAssociationFacetField
-
-