Package org.apache.lucene.facet.taxonomy

## Class IntTaxonomyFacets

- java.lang.Object
- - org.apache.lucene.facet.Facets
  - - org.apache.lucene.facet.taxonomy.TaxonomyFacets
    - - org.apache.lucene.facet.taxonomy.IntTaxonomyFacets

- Direct Known Subclasses:
    `TaxonomyFacetCounts`, `TaxonomyFacetIntAssociations`

      @Deprecated
      public abstract class IntTaxonomyFacets
      extends TaxonomyFacets

  Deprecated.
  Visibility of this class will be reduced to pkg-private in a future version. This class is meant to host common code as an internal implementation detail to `FastTaxonomyFacetCounts` and `TaxonomyFacetIntAssociations`,and is not intended as an extension point for user-created `Facets` implementations. If your code is relying on this, please migrate necessary functionality down into your own class.
  Base class for all taxonomy-based facets that aggregate to a per-ords int[].

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `protected class` | `IntTaxonomyFacets.IntAggregatedValue` | Deprecated. An accumulator for an integer aggregated value.

    - ### Nested classes/interfaces inherited from class org.apache.lucene.facet.taxonomy.TaxonomyFacets

      `TaxonomyFacets.AggregatedValue`

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected AssociationAggregationFunction` | `aggregationFunction` | Deprecated. Aggregation function used for combining values.
    `protected IntIntHashMap` | `sparseValues` | Deprecated. Sparse ordinal values.
    `protected int[]` | `values` | Deprecated. Dense ordinal values.

    - ### Fields inherited from class org.apache.lucene.facet.taxonomy.TaxonomyFacets

      `config, indexFieldName, taxoReader, valueComparator`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `IntTaxonomyFacets​(String indexFieldName, TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector fc)` | Deprecated. Constructor that defaults the aggregation function to `AssociationAggregationFunction.SUM`.
    `protected` | `IntTaxonomyFacets​(String indexFieldName, TaxonomyReader taxoReader, FacetsConfig config, AssociationAggregationFunction aggregationFunction, FacetsCollector fc)` | Deprecated. Constructor that uses the provided aggregation function.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected Number` | `aggregate​(Number existingVal, Number newVal)` | Deprecated. Apply an aggregation to the two values and return the result.
    `protected Number` | `getAggregationValue​(int ordinal)` | Deprecated. Get the aggregation value for this ordinal.
    `protected void` | `increment​(int ordinal)` | Deprecated. Increment the count for this ordinal by 1.
    `protected void` | `increment​(int ordinal, int amount)` | Deprecated. Increment the count for this ordinal by `amount`..
    `protected void` | `initializeValueCounters()` | Deprecated. If not done already, initialize the data structures storing counts.
    `protected TaxonomyFacets.AggregatedValue` | `newAggregatedValue()` | Deprecated. Initialize an accumulator.
    `protected void` | `setIncomingValue​(TopOrdAndNumberQueue.OrdAndValue incomingOrdAndValue, int ord)` | Deprecated. Set the value for a `TopOrdAndNumberQueue.OrdAndValue` to the one corresponding to the given ordinal.
    `protected void` | `updateValueFromRollup​(int ordinal, int childOrdinal)` | Deprecated. Roll-up the aggregation values from `childOrdinal` to `ordinal`.

    - ### Methods inherited from class org.apache.lucene.facet.taxonomy.TaxonomyFacets

      `childrenLoaded, getAllChildren, getAllDims, getCount, getSpecificValue, getTopChildren, getTopChildrenForPath, getTopDims, insertIntoQueue, makeTopOrdAndNumberQueue, missingAggregationValue, rollup, setCount, siblingsLoaded, useHashTable, verifyDim`

    - ### Methods inherited from class org.apache.lucene.facet.Facets

      `validateTopN`

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

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

- - ### Field Detail

    - #### aggregationFunction

          protected final AssociationAggregationFunction aggregationFunction

      Deprecated.
      Aggregation function used for combining values.

    - #### values

          protected int[] values

      Deprecated.
      Dense ordinal values.

      We are making this and `sparseValues` protected for some expert usage. e.g. It can be checked which is being used before a loop instead of calling `increment(int)` for each iteration.

    - #### sparseValues

          protected IntIntHashMap sparseValues

      Deprecated.
      Sparse ordinal values.
      See Also:
        `for why protected.`

  - ### Constructor Detail

    - #### IntTaxonomyFacets

          protected IntTaxonomyFacets​(String indexFieldName,
                                      TaxonomyReader taxoReader,
                                      FacetsConfig config,
                                      FacetsCollector fc)
                               throws IOException

      Deprecated.
      Constructor that defaults the aggregation function to `AssociationAggregationFunction.SUM`.
      Throws:
        `IOException`

    - #### IntTaxonomyFacets

          protected IntTaxonomyFacets​(String indexFieldName,
                                      TaxonomyReader taxoReader,
                                      FacetsConfig config,
                                      AssociationAggregationFunction aggregationFunction,
                                      FacetsCollector fc)
                               throws IOException

      Deprecated.
      Constructor that uses the provided aggregation function.
      Throws:
        `IOException`

  - ### Method Detail

    - #### initializeValueCounters

          protected void initializeValueCounters()

      Deprecated.
      Description copied from class: `TaxonomyFacets`
      If not done already, initialize the data structures storing counts.
      Overrides:
        `initializeValueCounters` in class `TaxonomyFacets`

    - #### increment

          protected void increment​(int ordinal)

      Deprecated.
      Increment the count for this ordinal by 1.

    - #### increment

          protected void increment​(int ordinal,
                                   int amount)

      Deprecated.
      Increment the count for this ordinal by `amount`..

    - #### getAggregationValue

          protected Number getAggregationValue​(int ordinal)

      Deprecated.
      Description copied from class: `TaxonomyFacets`
      Get the aggregation value for this ordinal.
      Overrides:
        `getAggregationValue` in class `TaxonomyFacets`

    - #### aggregate

          protected Number aggregate​(Number existingVal,
                                     Number newVal)

      Deprecated.
      Description copied from class: `TaxonomyFacets`
      Apply an aggregation to the two values and return the result.
      Overrides:
        `aggregate` in class `TaxonomyFacets`

    - #### updateValueFromRollup

          protected void updateValueFromRollup​(int ordinal,
                                               int childOrdinal)
                                        throws IOException

      Deprecated.
      Description copied from class: `TaxonomyFacets`
      Roll-up the aggregation values from `childOrdinal` to `ordinal`. Overrides should probably call this to update the counts. Overriding allows us to work with primitive types for the aggregation values, keeping aggregation efficient.
      Overrides:
        `updateValueFromRollup` in class `TaxonomyFacets`
      Throws:
        `IOException`

    - #### setIncomingValue

          protected void setIncomingValue​(TopOrdAndNumberQueue.OrdAndValue incomingOrdAndValue,
                                          int ord)

      Deprecated.
      Description copied from class: `TaxonomyFacets`
      Set the value for a `TopOrdAndNumberQueue.OrdAndValue` to the one corresponding to the given ordinal.
      Overrides:
        `setIncomingValue` in class `TaxonomyFacets`

    - #### newAggregatedValue

          protected TaxonomyFacets.AggregatedValue newAggregatedValue()

      Deprecated.
      Description copied from class: `TaxonomyFacets`
      Initialize an accumulator.
      Overrides:
        `newAggregatedValue` in class `TaxonomyFacets`