org.apache.solr.handler.component

## Class StatsField.HllOptions

- java.lang.Object
- - org.apache.solr.handler.component.StatsField.HllOptions

- Enclosing class:
    StatsField

      public static final class StatsField.HllOptions
      extends Object

  Helper Struct for parsing and encapsulating all of the options relaed to building a `HLL`
  See Also:
    `StatsField.Stat.cardinality`
  NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.google.common.hash.HashFunction` | `getHasher()` May be null if user has indicated that field values are pre-hashed
    `int` | `getLog2m()`
    `int` | `getRegwidth()`
    `HLL` | `newHLL()`
    `static StatsField.HllOptions` | `parseHllOptions(SolrParams localParams, SchemaField field)` Creates an HllOptions based on the (local) params specified (if appropriate).

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

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

- - ### Method Detail

    - #### parseHllOptions

          public static StatsField.HllOptions parseHllOptions(SolrParams localParams,
                                                              SchemaField field)
                                                       throws SolrException

      Creates an HllOptions based on the (local) params specified (if appropriate).
      Parameters:
        `localParams` - the LocalParams for this `StatsField`
        `field` - the field corresponding to this `StatsField`, may be null if these stats are over a value source
      Returns:
        the `StatsField.HllOptions` to use based on the params, or null if no `HLL` should be computed
      Throws:
        `SolrException` - if there are invalid options

    - #### getLog2m

          public int getLog2m()

      See Also:
        `HLL`

    - #### getRegwidth

          public int getRegwidth()

      See Also:
        `HLL`

    - #### getHasher

          public com.google.common.hash.HashFunction getHasher()

      May be null if user has indicated that field values are pre-hashed

    - #### newHLL

          public HLL newHLL()

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