Class FloatAssociationFacetField

  • All Implemented Interfaces:
    IndexableField

    public class FloatAssociationFacetField
    extends AssociationFacetField
    Add an instance of this to your Document to add a facet label associated with a float. Use TaxonomyFacetSumFloatAssociations to aggregate float values per facet label at search time.
    WARNING: This API is experimental and might change in incompatible ways in the next release.
    • Constructor Detail

      • FloatAssociationFacetField

        public FloatAssociationFacetField​(float assoc,
                                          String dim,
                                          String... path)
        Creates this from dim and path and a float association
    • Method Detail

      • floatToBytesRef

        public static BytesRef floatToBytesRef​(float v)
        Encodes a float as a 4-byte BytesRef.
      • bytesRefToFloat

        public static float bytesRefToFloat​(BytesRef b)
        Decodes a previously encoded float.