org.apache.solr.analytics.util

## Class AnalyticsParsers

- java.lang.Object
- - org.apache.solr.analytics.util.AnalyticsParsers

-     public class AnalyticsParsers
      extends Object

  Class to hold the parsers used for Solr Analytics.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `AnalyticsParsers.NumericParser` Converts the long returned by NumericDocValues into the correct number and return it as a string.
    `static interface` | `AnalyticsParsers.Parser` For use in classes that grab values by docValue.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static AnalyticsParsers.NumericParser` | `DATE_DOC_VALUES_PARSER` Converts the BytesRef or long to the correct date string.
    `static AnalyticsParsers.NumericParser` | `DOUBLE_DOC_VALUES_PARSER` Converts the BytesRef or long to the correct double string.
    `static AnalyticsParsers.NumericParser` | `FLOAT_DOC_VALUES_PARSER` Converts the BytesRef or long to the correct float string.
    `static AnalyticsParsers.NumericParser` | `INT_DOC_VALUES_PARSER` Converts the BytesRef or long to the correct int string.
    `static AnalyticsParsers.NumericParser` | `LONG_DOC_VALUES_PARSER` Converts the BytesRef or long to the correct long string.
    `static AnalyticsParsers.Parser` | `STRING_PARSER` Converts the BytesRef to the correct string.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AnalyticsParsers()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static AnalyticsParsers.Parser` | `getParser(Class<? extends FieldType> class1)` Returns a parser that will translate a BytesRef or long from DocValues into a String that correctly represents the value.

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

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

- - ### Field Detail

    - #### INT_DOC_VALUES_PARSER

          public static final AnalyticsParsers.NumericParser INT_DOC_VALUES_PARSER

      Converts the BytesRef or long to the correct int string.

    - #### LONG_DOC_VALUES_PARSER

          public static final AnalyticsParsers.NumericParser LONG_DOC_VALUES_PARSER

      Converts the BytesRef or long to the correct long string.

    - #### FLOAT_DOC_VALUES_PARSER

          public static final AnalyticsParsers.NumericParser FLOAT_DOC_VALUES_PARSER

      Converts the BytesRef or long to the correct float string.

    - #### DOUBLE_DOC_VALUES_PARSER

          public static final AnalyticsParsers.NumericParser DOUBLE_DOC_VALUES_PARSER

      Converts the BytesRef or long to the correct double string.

    - #### DATE_DOC_VALUES_PARSER

          public static final AnalyticsParsers.NumericParser DATE_DOC_VALUES_PARSER

      Converts the BytesRef or long to the correct date string.

    - #### STRING_PARSER

          public static final AnalyticsParsers.Parser STRING_PARSER

      Converts the BytesRef to the correct string.

  - ### Constructor Detail

    - #### AnalyticsParsers

          public AnalyticsParsers()

  - ### Method Detail

    - #### getParser

          public static AnalyticsParsers.Parser getParser(Class<? extends FieldType> class1)

      Returns a parser that will translate a BytesRef or long from DocValues into a String that correctly represents the value.
      Parameters:
        `class1` - class of the FieldType of the field being faceted on.
      Returns:
        A Parser

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