Class ElasticsearchUtil


  • public abstract class ElasticsearchUtil
    extends Object
    Utility methods for Elasticsearch big data implementation.
    Since:
    8.1.0
    Version:
    $Revision: 24477 $ $Date: 2021-04-28 11:30:36 -0300 (Wed, 28 Apr 2021) $
    • Constructor Detail

      • ElasticsearchUtil

        public ElasticsearchUtil()
    • Method Detail

      • getValueInMapChain

        public static Object getValueInMapChain​(String key,
                                                Map currentObject)
        Returns event field value from the given object by your full key id.
        Parameters:
        key - the event field identifier.
        currentObject - the current object.
        Returns:
        event value in chain map.
        Since:
        12.2.0
      • getValuesInMapChain

        public static List<Object> getValuesInMapChain​(String key,
                                                       Object currentObject)
        Returns event field values from the given object by your full key id.
        Parameters:
        key - the event field identifier.
        currentObject - the current object.
        Returns:
        event values in chain map.
        Since:
        12.2.0
      • putValueInMapChain

        public static void putValueInMapChain​(String key,
                                              Object value,
                                              Map map)
        Create a chain of Maps and put the value in the most inner map.
        Parameters:
        key - the id of event for chain identifier.
        value - the value to store
        map - the root chain.
        Since:
        12.0.0
      • convertFieldAndValuesToElasticsearch

        public static Map<String,​Object> convertFieldAndValuesToElasticsearch​(Map<DocumentTypeField,​Object> fieldValues)
        Method responsable for perform the conversion of DocumentTypeField to the correct elasticsearch field, also this will convert the value to the right format.
        Parameters:
        fieldValues - the map of DocumentTypeField and relative value.
        Returns:
        the converted map to elasticsearch field and value.
        Since:
        12.3.0