(self, aggregation_spec)
return aggregation
Helper method to execute aggregation in OpenSearch.

        Args:
            aggregation_spec: Dict with OpenSearch aggregation spec.

        Returns:
            OpenSearch aggregation result.
Helper method to execute aggregation in OpenSearch.
Helper method to execute aggregation in OpenSearch .
def opensearch_aggregation(self, aggregation_spec):
        """Helper method to execute aggregation in OpenSearch.

        Args:
            aggregation_spec: Dict with OpenSearch aggregation spec.

        Returns:
            OpenSearch aggregation result.
        """
        # pylint: disable=unexpected-keyword-arg, no-value-for-parameter

        try:
            aggregation = self.opensearch.client.search(
                index=self.indices, body=aggregation_spec, size=0)
        except opensearchpy.NotFoundError:
            logger.error('Unable to find indices: {0:s}'.format(
                ','.join(self.indices)))
            raise
        return aggregation
def opensearch_aggregation ( self , aggregation_spec ) : # pylint: disable=unexpected-keyword-arg, no-value-for-parameter try : aggregation = self . opensearch . client . search ( index = self . indices , body = aggregation_spec , size = 0 ) except opensearchpy . NotFoundError : logger . error ( 'Unable to find indices: {0:s}' . format ( ',' . join ( self . indices ) ) ) raise return aggregation