Aggregations

聚合

Elasticsearch提供完整的Java API来使用聚合。 请参阅聚合指南

使用 AggregationBuilders 构建对象,增加到搜索请求中:

import org.elasticsearch.search.aggregations.AggregationBuilders;
SearchResponse sr = node.client().prepareSearch()
        .setQuery( /* your query */ )
        .addAggregation( /* add an aggregation */ )
        .execute().actionGet();

results matching ""

    No results matching ""