本文整理汇总了Java中org.elasticsearch.search.aggregations.Aggregator.parent方法的典型用法代码示例。如果您正苦于以下问题:Java Aggregator.parent方法的具体用法?Java Aggregator.parent怎么用?Java Aggregator.parent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.elasticsearch.search.aggregations.Aggregator
的用法示例。
在下文中一共展示了Aggregator.parent方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAggregatorPath
import org.elasticsearch.search.aggregations.Aggregator; //导入方法依赖的package包/类
public static List<String> getAggregatorPath(Aggregator agg) {
LinkedList<String> path = new LinkedList<>();
while (agg != null) {
path.addFirst(agg.name());
agg = agg.parent();
}
return path;
}
示例2: defaultPrecision
import org.elasticsearch.search.aggregations.Aggregator; //导入方法依赖的package包/类
private static int defaultPrecision(Aggregator parent) {
int precision = HyperLogLogPlusPlus.DEFAULT_PRECISION;
while (parent != null) {
if (parent instanceof SingleBucketAggregator == false) {
// if the parent creates buckets, we substract 5 to the precision,
// which will effectively divide the memory usage of each counter by 32
precision -= 5;
}
parent = parent.parent();
}
return Math.max(precision, HyperLogLogPlusPlus.MIN_PRECISION);
}
示例3: findClosestNestedAggregator
import org.elasticsearch.search.aggregations.Aggregator; //导入方法依赖的package包/类
private static NestedAggregator findClosestNestedAggregator(Aggregator parent) {
for (; parent != null; parent = parent.parent()) {
if (parent instanceof NestedAggregator) {
return (NestedAggregator) parent;
}
}
return null;
}
示例4: findClosestNestedPath
import org.elasticsearch.search.aggregations.Aggregator; //导入方法依赖的package包/类
private static Query findClosestNestedPath(Aggregator parent) {
for (; parent != null; parent = parent.parent()) {
if (parent instanceof NestedAggregator) {
return ((NestedAggregator) parent).childFilter;
} else if (parent instanceof ReverseNestedAggregator) {
return ((ReverseNestedAggregator) parent).getParentFilter();
}
}
return null;
}