org.apache.lucene.facet.taxonomy

## Class AssociationFacetField

- java.lang.Object
- - org.apache.lucene.document.Field
  - - org.apache.lucene.facet.taxonomy.AssociationFacetField

- All Implemented Interfaces:
    IndexableField
  Direct Known Subclasses:
    FloatAssociationFacetField, IntAssociationFacetField

      public class AssociationFacetField
      extends Field

  Add an instance of this to your `Document` to add a facet label associated with an arbitrary byte[]. This will require a custom `Facets` implementation at search time; see `IntAssociationFacetField` and `FloatAssociationFacetField` to use existing `Facets` implementations.
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.lucene.document.Field

      `Field.Store`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `BytesRef` | `assoc` Associated value.
    `String` | `dim` Dimension for this field.
    `String[]` | `path` Facet path for this field.
    `static FieldType` | `TYPE` Indexed `FieldType`.

    - ### Fields inherited from class org.apache.lucene.document.Field

      `boost, fieldsData, name, tokenStream, type`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AssociationFacetField(BytesRef assoc, String dim, String... path)` Creates this from `dim` and `path` and an association

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `toString()`

    - ### 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`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### TYPE

          public static final FieldType TYPE

      Indexed `FieldType`.

    - #### dim

          public final String dim

      Dimension for this field.

    - #### path

          public final String[] path

      Facet path for this field.

    - #### assoc

          public final BytesRef assoc

      Associated value.

  - ### Constructor Detail

    - #### AssociationFacetField

          public AssociationFacetField(BytesRef assoc,
                                       String dim,
                                       String... path)

      Creates this from `dim` and `path` and an association

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Field`

Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.