当前位置: 首页>>代码示例>>Java>>正文


Java Aggregator.parent方法代码示例

本文整理汇总了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;
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:9,代码来源:AggregationProfiler.java

示例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);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:14,代码来源:CardinalityAggregatorFactory.java

示例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;
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:9,代码来源:ReverseNestedAggregator.java

示例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;
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:11,代码来源:NestedAggregator.java


注:本文中的org.elasticsearch.search.aggregations.Aggregator.parent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。