當前位置: 首頁>>代碼示例>>Java>>正文


Java ExtendedStatsBuilder類代碼示例

本文整理匯總了Java中org.elasticsearch.search.aggregations.metrics.stats.extended.ExtendedStatsBuilder的典型用法代碼示例。如果您正苦於以下問題:Java ExtendedStatsBuilder類的具體用法?Java ExtendedStatsBuilder怎麽用?Java ExtendedStatsBuilder使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ExtendedStatsBuilder類屬於org.elasticsearch.search.aggregations.metrics.stats.extended包,在下文中一共展示了ExtendedStatsBuilder類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: extendedStatsQuery

import org.elasticsearch.search.aggregations.metrics.stats.extended.ExtendedStatsBuilder; //導入依賴的package包/類
public static void extendedStatsQuery(Client client ) {
	SearchResponse res = null;
	ExtendedStatsBuilder agg = AggregationBuilders
			.extendedStats("extended_stats_num")
			.field("like");
	
	res = client.prepareSearch("search_test")
			.setTypes("article")
			.setSearchType(SearchType.DFS_QUERY_THEN_FETCH)
			.addAggregation(agg)
			.setFrom(0)
			.setSize(10)
			.execute().actionGet();
	System.out.println(res);
	
	// on shutdown
	client.close();
}
 
開發者ID:walle-liao,項目名稱:jaf-examples,代碼行數:19,代碼來源:AggsQueryTest.java

示例2: extendedStats

import org.elasticsearch.search.aggregations.metrics.stats.extended.ExtendedStatsBuilder; //導入依賴的package包/類
/**
 * Create a new {@link ExtendedStats} aggregation with the given name.
 */
public static ExtendedStatsBuilder extendedStats(String name) {
    return new ExtendedStatsBuilder(name);
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:7,代碼來源:AggregationBuilders.java

示例3: createNumericSearchBuilder

import org.elasticsearch.search.aggregations.metrics.stats.extended.ExtendedStatsBuilder; //導入依賴的package包/類
private SearchRequestBuilder createNumericSearchBuilder(Collection<FieldInfo> fields) {
	SearchRequestBuilder builder = client.prepareSearch(indexName);
	for(FieldInfo info : fields) {
		ExtendedStatsBuilder stats = AggregationBuilders.extendedStats(EXTENDED_STATS_AGG + info.getFullPath()).field(info.getFullPath());
		QueryBuilder filter = new BoolQueryBuilder().filter(new ExistsQueryBuilder(info.getFullPath()));
		FilterAggregationBuilder aggregation = AggregationBuilders.filter(FILTER_AGG + info.getFullPath()).filter(filter).subAggregation(stats);
		builder.addAggregation(createNestedIfNecessary(info, aggregation));
	}
	builder.setSize(ZERO_ITEMS);
	return builder;
}
 
開發者ID:kucera-jan-cz,項目名稱:esBench,代碼行數:12,代碼來源:FieldAnalyzer.java


注:本文中的org.elasticsearch.search.aggregations.metrics.stats.extended.ExtendedStatsBuilder類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。