Class ElasticSearchUtils


  • public class ElasticSearchUtils
    extends Object
    Since:
    0.3.0
    • Method Detail

      • calculateDateLimits

        public Date[] calculateDateLimits​(ElasticSearchClient client,
                                          org.dashbuilder.dataset.DataSetMetadata metadata,
                                          String dateColumnId,
                                          Query query)
                                   throws ElasticSearchClientGenericException

        Obtain the minimum date and maximum date values for the given column with identifier dateColumnId.

        Parameters:
        client - The client for performing the query to ELS
        metadata - The data set metadata
        dateColumnId - The column identifier for the date type column
        query - The query model, if any, for filtering the results
        Returns:
        The minimum and maximum dates.
        Throws:
        ElasticSearchClientGenericException
      • transformPattern

        public String transformPattern​(String pattern)
        ELS wildcard query characters replacement for Dashbuilder the LIKE core function ones: ------------------------------------------------------- | ELS | Dashbuilder | Description | | ? | _ | Matches any character | | * | % | Matches zero or more characters | -------------------------------------------------------