Package org.apache.lucene.facet.taxonomy
Class FloatAssociationFacetField
- java.lang.Object
-
- org.apache.lucene.document.Field
-
- org.apache.lucene.facet.taxonomy.AssociationFacetField
-
- org.apache.lucene.facet.taxonomy.FloatAssociationFacetField
-
- All Implemented Interfaces:
IndexableField
public class FloatAssociationFacetField extends AssociationFacetField
Add an instance of this to yourDocument
to add a facet label associated with a float. UseTaxonomyFacetSumFloatAssociations
to aggregate float 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 FloatAssociationFacetField(float assoc, java.lang.String dim, java.lang.String... path)
Creates this fromdim
andpath
and a float association
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static float
bytesRefToFloat(BytesRef b)
Decodes a previously encodedfloat
.static BytesRef
floatToBytesRef(float v)
Encodes afloat
as a 4-byteBytesRef
.java.lang.String
toString()
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
-
floatToBytesRef
public static BytesRef floatToBytesRef(float v)
Encodes afloat
as a 4-byteBytesRef
.
-
bytesRefToFloat
public static float bytesRefToFloat(BytesRef b)
Decodes a previously encodedfloat
.
-
toString
public java.lang.String toString()
Description copied from class:Field
Prints a Field for human consumption.- Overrides:
toString
in classAssociationFacetField
-
-