org.apache.lucene.facet.associations

## Class AssociationsListBuilder

- java.lang.Object
- - org.apache.lucene.facet.associations.AssociationsListBuilder

- All Implemented Interfaces:
    CategoryListBuilder

      public class AssociationsListBuilder
      extends Object
      implements CategoryListBuilder

  A `AssociationsListBuilder` which encodes category-association value pairs. Every category-association pair is written under the respective association's `CategoryAssociation.getCategoryListID()`.

  NOTE: associations list do not encode the counting list data. You should use `CountingListBuilder` to build that information and then merge the results of both `build(IntsRef, Iterable)`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AssociationsListBuilder(CategoryAssociationsContainer associations)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Map<String,BytesRef>` | `build(IntsRef ordinals, Iterable<CategoryPath> categories)` Returns the encoded ordinals data.

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

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

- - ### Constructor Detail

    - #### AssociationsListBuilder

          public AssociationsListBuilder(CategoryAssociationsContainer associations)

  - ### Method Detail

    - #### build

          public Map<String,BytesRef> build(IntsRef ordinals,
                                   Iterable<CategoryPath> categories)
                                     throws IOException

      Description copied from interface: `CategoryListBuilder`
      Returns the encoded ordinals data.
      Specified by:
        `build` in interface `CategoryListBuilder`
      Throws:
        `IOException`

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