Interface ElasticsearchSearchAggregation<A>

    • Method Detail

      • request

        com.google.gson.JsonObject request​(AggregationRequestContext context)
        Contribute to the request, making sure that the requirements for this aggregation are met.
        Parameters:
        context - The request context, to access context information or store information that will be made available later to the extract(JsonObject, AggregationExtractContext) method.
        Returns:
        The JSON object representing the aggregation.
      • extract

        A extract​(com.google.gson.JsonObject aggregationResult,
                  AggregationExtractContext context)
        Extract the result of the aggregation from the response.
        Parameters:
        aggregationResult - The part of the response body relevant to the aggregation to extract.
        context - The extract context, to extract information from the response's JSON body or retrieve information that was stored earlier in the request(AggregationRequestContext) method.
        Returns:
        The aggregation result extracted from the response.