|
@@ -36,7 +36,8 @@ public class ChildCountAnalysisBuilder implements IEsCountAnalysisBuilder {
|
|
if (ifHaveChild) {
|
|
if (ifHaveChild) {
|
|
|
|
|
|
if (!CollectionUtils.isEmpty(values)) {
|
|
if (!CollectionUtils.isEmpty(values)) {
|
|
- termAgg = AggregationBuilders.terms(i -> i.field(field).include(j -> j.terms(values)).size(topN));
|
|
|
|
|
|
+ termAgg = AggregationBuilders.terms(i -> i.field("custom_field.stats_value.raw").include(j -> j.terms(values)).size(topN));
|
|
|
|
+// termAgg = AggregationBuilders.terms(i -> i.field(field).include(j -> j.terms(values)).size(topN));
|
|
} else {
|
|
} else {
|
|
if (StringUtils.isNotEmpty(valueOne) && StringUtils.isEmpty(valueTwo)) {
|
|
if (StringUtils.isNotEmpty(valueOne) && StringUtils.isEmpty(valueTwo)) {
|
|
String str = "*";
|
|
String str = "*";
|
|
@@ -58,7 +59,7 @@ public class ChildCountAnalysisBuilder implements IEsCountAnalysisBuilder {
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
if (!CollectionUtils.isEmpty(values)) {
|
|
if (!CollectionUtils.isEmpty(values)) {
|
|
- termAgg = AggregationBuilders.terms(i -> i.field(field).include(j -> j.terms(values)).size(topN));
|
|
|
|
|
|
+ termAgg = AggregationBuilders.terms(i -> i.field("custom_field.field_value.raw").include(j -> j.terms(values)).size(topN));
|
|
} else {
|
|
} else {
|
|
if (StringUtils.isNotEmpty(valueOne) && StringUtils.isEmpty(valueTwo)) {
|
|
if (StringUtils.isNotEmpty(valueOne) && StringUtils.isEmpty(valueTwo)) {
|
|
String str = "*";
|
|
String str = "*";
|