1.定义
TermsAggregationBuilder tab = AggregationBuilders.terms(ProductInfoEnum.BRANDCODE.getName())
.field(ProductInfoEnum.BRANDCODE.getName())
.order(Terms.Order.aggregation("price_count", false));
2.使用
.addAggregation(tab)
出现:
{ "error" : "JsonGenerationException[Can not write a field name, expecting a value]"}
TermsAggregationBuilder tab = AggregationBuilders.terms(ProductInfoEnum.BRANDCODE.getName())
.field(ProductInfoEnum.BRANDCODE.getName())
.order(Terms.Order.aggregation("price_count", false));
2.使用
.addAggregation(tab)
出现:
{ "error" : "JsonGenerationException[Can not write a field name, expecting a value]"}
1 个回复
Cheetah
赞同来自: learnonly