本文整理汇总了Java中org.elasticsearch.search.aggregations.AggregatorFactories类的典型用法代码示例。如果您正苦于以下问题:Java AggregatorFactories类的具体用法?Java AggregatorFactories怎么用?Java AggregatorFactories使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AggregatorFactories类属于org.elasticsearch.search.aggregations包,在下文中一共展示了AggregatorFactories类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: TopHitsAggregatorFactory
import org.elasticsearch.search.aggregations.AggregatorFactories; //导入依赖的package包/类
public TopHitsAggregatorFactory(String name, int from, int size, boolean explain, boolean version, boolean trackScores,
Optional<SortAndFormats> sort, HighlightBuilder highlightBuilder, StoredFieldsContext storedFieldsContext,
List<String> docValueFields, List<ScriptFieldsContext.ScriptField> scriptFields, FetchSourceContext fetchSourceContext,
SearchContext context, AggregatorFactory<?> parent, AggregatorFactories.Builder subFactories, Map<String, Object> metaData)
throws IOException {
super(name, context, parent, subFactories, metaData);
this.from = from;
this.size = size;
this.explain = explain;
this.version = version;
this.trackScores = trackScores;
this.sort = sort;
this.highlightBuilder = highlightBuilder;
this.storedFieldsContext = storedFieldsContext;
this.docValueFields = docValueFields;
this.scriptFields = scriptFields;
this.fetchSourceContext = fetchSourceContext;
}
开发者ID:justor,项目名称:elasticsearch_my,代码行数:19,代码来源:TopHitsAggregatorFactory.java
示例2: SignificantTermsAggregatorFactory
import org.elasticsearch.search.aggregations.AggregatorFactories; //导入依赖的package包/类
public SignificantTermsAggregatorFactory(String name, ValuesSourceConfig<ValuesSource> config, IncludeExclude includeExclude,
String executionHint, QueryBuilder filterBuilder, TermsAggregator.BucketCountThresholds bucketCountThresholds,
SignificanceHeuristic significanceHeuristic, SearchContext context, AggregatorFactory<?> parent,
AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);
this.includeExclude = includeExclude;
this.executionHint = executionHint;
this.filter = filterBuilder == null
? null
: filterBuilder.toQuery(context.getQueryShardContext());
IndexSearcher searcher = context.searcher();
this.supersetNumDocs = filter == null
// Important - need to use the doc count that includes deleted docs
// or we have this issue: https://github.com/elastic/elasticsearch/issues/7951
? searcher.getIndexReader().maxDoc()
: searcher.count(filter);
this.bucketCountThresholds = bucketCountThresholds;
this.significanceHeuristic = significanceHeuristic;
setFieldInfo(context);
}
开发者ID:justor,项目名称:elasticsearch_my,代码行数:22,代码来源:SignificantTermsAggregatorFactory.java
示例3: HistogramAggregator
import org.elasticsearch.search.aggregations.AggregatorFactories; //导入依赖的package包/类
public HistogramAggregator(String name, AggregatorFactories factories, Rounding rounding, InternalOrder order, boolean keyed,
long minDocCount, @Nullable ExtendedBounds extendedBounds, @Nullable ValuesSource.Numeric valuesSource,
ValueFormatter formatter, InternalHistogram.Factory<?> histogramFactory, AggregationContext aggregationContext,
Aggregator parent, List<PipelineAggregator> pipelineAggregators, Map<String, Object> metaData) throws IOException {
super(name, factories, aggregationContext, parent, pipelineAggregators, metaData);
this.rounding = rounding;
this.order = order;
this.keyed = keyed;
this.minDocCount = minDocCount;
this.extendedBounds = extendedBounds;
this.valuesSource = valuesSource;
this.formatter = formatter;
this.histogramFactory = histogramFactory;
bucketOrds = new LongHash(1, aggregationContext.bigArrays());
}
开发者ID:baidu,项目名称:Elasticsearch,代码行数:18,代码来源:HistogramAggregator.java
示例4: FiltersAggregator
import org.elasticsearch.search.aggregations.AggregatorFactories; //导入依赖的package包/类
public FiltersAggregator(String name, AggregatorFactories factories, String[] keys, Weight[] filters, boolean keyed, String otherBucketKey,
AggregationContext aggregationContext,
Aggregator parent, List<PipelineAggregator> pipelineAggregators, Map<String, Object> metaData)
throws IOException {
super(name, factories, aggregationContext, parent, pipelineAggregators, metaData);
this.keyed = keyed;
this.keys = keys;
this.filters = filters;
this.showOtherBucket = otherBucketKey != null;
this.otherBucketKey = otherBucketKey;
if (showOtherBucket) {
this.totalNumKeys = keys.length + 1;
} else {
this.totalNumKeys = keys.length;
}
}
开发者ID:baidu,项目名称:Elasticsearch,代码行数:17,代码来源:FiltersAggregator.java
示例5: RangeAggregator
import org.elasticsearch.search.aggregations.AggregatorFactories; //导入依赖的package包/类
public RangeAggregator(String name, AggregatorFactories factories, ValuesSource.Numeric valuesSource, DocValueFormat format,
InternalRange.Factory rangeFactory, Range[] ranges, boolean keyed, SearchContext context,
Aggregator parent, List<PipelineAggregator> pipelineAggregators, Map<String, Object> metaData) throws IOException {
super(name, factories, context, parent, pipelineAggregators, metaData);
assert valuesSource != null;
this.valuesSource = valuesSource;
this.format = format;
this.keyed = keyed;
this.rangeFactory = rangeFactory;
this.ranges = ranges;
maxTo = new double[this.ranges.length];
maxTo[0] = this.ranges[0].to;
for (int i = 1; i < this.ranges.length; ++i) {
maxTo[i] = Math.max(this.ranges[i].to,maxTo[i-1]);
}
}
开发者ID:justor,项目名称:elasticsearch_my,代码行数:21,代码来源:RangeAggregator.java
示例6: create
import org.elasticsearch.search.aggregations.AggregatorFactories; //导入依赖的package包/类
@Override
Aggregator create(String name, AggregatorFactories factories, ValuesSource valuesSource, Terms.Order order,
DocValueFormat format, TermsAggregator.BucketCountThresholds bucketCountThresholds, IncludeExclude includeExclude,
SearchContext context, Aggregator parent, SubAggCollectionMode subAggCollectMode,
boolean showTermDocCountError, List<PipelineAggregator> pipelineAggregators, Map<String, Object> metaData)
throws IOException {
if (includeExclude != null || factories.countAggregators() > 0
// we need the FieldData impl to be able to extract the
// segment to global ord mapping
|| valuesSource.getClass() != ValuesSource.Bytes.FieldData.class) {
return GLOBAL_ORDINALS.create(name, factories, valuesSource, order, format, bucketCountThresholds, includeExclude,
context, parent, subAggCollectMode, showTermDocCountError, pipelineAggregators, metaData);
}
return new GlobalOrdinalsStringTermsAggregator.LowCardinality(name, factories,
(ValuesSource.Bytes.WithOrdinals) valuesSource, order, format, bucketCountThresholds, context, parent,
subAggCollectMode, showTermDocCountError, pipelineAggregators, metaData);
}
开发者ID:justor,项目名称:elasticsearch_my,代码行数:18,代码来源:TermsAggregatorFactory.java
示例7: RangeAggregator
import org.elasticsearch.search.aggregations.AggregatorFactories; //导入依赖的package包/类
public RangeAggregator(String name, AggregatorFactories factories, ValuesSource.Numeric valuesSource, ValueFormat format,
InternalRange.Factory rangeFactory, List<Range> ranges, boolean keyed, AggregationContext aggregationContext,
Aggregator parent, List<PipelineAggregator> pipelineAggregators, Map<String, Object> metaData) throws IOException {
super(name, factories, aggregationContext, parent, pipelineAggregators, metaData);
assert valuesSource != null;
this.valuesSource = valuesSource;
this.formatter = format.formatter();
this.keyed = keyed;
this.rangeFactory = rangeFactory;
this.ranges = ranges.toArray(new Range[ranges.size()]);
ValueParser parser = format != null ? format.parser() : ValueParser.RAW;
for (int i = 0; i < this.ranges.length; i++) {
this.ranges[i].process(parser, context.searchContext());
}
sortRanges(this.ranges);
maxTo = new double[this.ranges.length];
maxTo[0] = this.ranges[0].to;
for (int i = 1; i < this.ranges.length; ++i) {
maxTo[i] = Math.max(this.ranges[i].to,maxTo[i-1]);
}
}
开发者ID:baidu,项目名称:Elasticsearch,代码行数:26,代码来源:RangeAggregator.java
示例8: DateHistogramAggregator
import org.elasticsearch.search.aggregations.AggregatorFactories; //导入依赖的package包/类
DateHistogramAggregator(String name, AggregatorFactories factories, Rounding rounding, long offset, InternalOrder order,
boolean keyed,
long minDocCount, @Nullable ExtendedBounds extendedBounds, @Nullable ValuesSource.Numeric valuesSource,
DocValueFormat formatter, SearchContext aggregationContext,
Aggregator parent, List<PipelineAggregator> pipelineAggregators, Map<String, Object> metaData) throws IOException {
super(name, factories, aggregationContext, parent, pipelineAggregators, metaData);
this.rounding = rounding;
this.offset = offset;
this.order = order;
this.keyed = keyed;
this.minDocCount = minDocCount;
this.extendedBounds = extendedBounds;
this.valuesSource = valuesSource;
this.formatter = formatter;
bucketOrds = new LongHash(1, aggregationContext.bigArrays());
}
开发者ID:justor,项目名称:elasticsearch_my,代码行数:19,代码来源:DateHistogramAggregator.java
示例9: HistogramAggregator
import org.elasticsearch.search.aggregations.AggregatorFactories; //导入依赖的package包/类
HistogramAggregator(String name, AggregatorFactories factories, double interval, double offset,
InternalOrder order, boolean keyed, long minDocCount, double minBound, double maxBound,
@Nullable ValuesSource.Numeric valuesSource, DocValueFormat formatter,
SearchContext context, Aggregator parent,
List<PipelineAggregator> pipelineAggregators, Map<String, Object> metaData) throws IOException {
super(name, factories, context, parent, pipelineAggregators, metaData);
if (interval <= 0) {
throw new IllegalArgumentException("interval must be positive, got: " + interval);
}
this.interval = interval;
this.offset = offset;
this.order = order;
this.keyed = keyed;
this.minDocCount = minDocCount;
this.minBound = minBound;
this.maxBound = maxBound;
this.valuesSource = valuesSource;
this.formatter = formatter;
bucketOrds = new LongHash(1, context.bigArrays());
}
开发者ID:justor,项目名称:elasticsearch_my,代码行数:23,代码来源:HistogramAggregator.java
示例10: registerPipelineAggregation
import org.elasticsearch.search.aggregations.AggregatorFactories; //导入依赖的package包/类
private void registerPipelineAggregation(PipelineAggregationSpec spec) {
if (false == transportClient) {
namedXContents.add(new NamedXContentRegistry.Entry(BaseAggregationBuilder.class, spec.getName(), (p, c) -> {
AggregatorFactories.AggParseContext context = (AggregatorFactories.AggParseContext) c;
return spec.getParser().parse(context.name, context.queryParseContext);
}));
}
namedWriteables.add(
new NamedWriteableRegistry.Entry(PipelineAggregationBuilder.class, spec.getName().getPreferredName(), spec.getReader()));
namedWriteables.add(
new NamedWriteableRegistry.Entry(PipelineAggregator.class, spec.getName().getPreferredName(), spec.getAggregatorReader()));
for (Map.Entry<String, Writeable.Reader<? extends InternalAggregation>> resultReader : spec.getResultReaders().entrySet()) {
namedWriteables
.add(new NamedWriteableRegistry.Entry(InternalAggregation.class, resultReader.getKey(), resultReader.getValue()));
}
}
开发者ID:justor,项目名称:elasticsearch_my,代码行数:17,代码来源:SearchModule.java
示例11: DiversifiedMapSamplerAggregator
import org.elasticsearch.search.aggregations.AggregatorFactories; //导入依赖的package包/类
public DiversifiedMapSamplerAggregator(String name, int shardSize, AggregatorFactories factories,
AggregationContext aggregationContext, Aggregator parent, List<PipelineAggregator> pipelineAggregators, Map<String, Object> metaData,
ValuesSource valuesSource, int maxDocsPerValue) throws IOException {
super(name, shardSize, factories, aggregationContext, parent, pipelineAggregators, metaData);
this.valuesSource = valuesSource;
this.maxDocsPerValue = maxDocsPerValue;
bucketOrds = new BytesRefHash(shardSize, aggregationContext.bigArrays());
}
开发者ID:baidu,项目名称:Elasticsearch,代码行数:10,代码来源:DiversifiedMapSamplerAggregator.java
示例12: MatrixStatsAggregatorFactory
import org.elasticsearch.search.aggregations.AggregatorFactories; //导入依赖的package包/类
public MatrixStatsAggregatorFactory(String name,
Map<String, ValuesSourceConfig<ValuesSource.Numeric>> configs, MultiValueMode multiValueMode,
SearchContext context, AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder,
Map<String, Object> metaData) throws IOException {
super(name, configs, context, parent, subFactoriesBuilder, metaData);
this.multiValueMode = multiValueMode;
}
开发者ID:justor,项目名称:elasticsearch_my,代码行数:8,代码来源:MatrixStatsAggregatorFactory.java
示例13: doBuild
import org.elasticsearch.search.aggregations.AggregatorFactories; //导入依赖的package包/类
@Override
protected final MultiValuesSourceAggregatorFactory<VS, ?> doBuild(SearchContext context, AggregatorFactory<?> parent,
AggregatorFactories.Builder subFactoriesBuilder) throws IOException {
Map<String, ValuesSourceConfig<VS>> configs = resolveConfig(context);
MultiValuesSourceAggregatorFactory<VS, ?> factory = innerBuild(context, configs, parent, subFactoriesBuilder);
return factory;
}
开发者ID:justor,项目名称:elasticsearch_my,代码行数:8,代码来源:MultiValuesSourceAggregationBuilder.java
示例14: LongTermsAggregator
import org.elasticsearch.search.aggregations.AggregatorFactories; //导入依赖的package包/类
public LongTermsAggregator(String name, AggregatorFactories factories, ValuesSource.Numeric valuesSource, ValueFormat format,
Terms.Order order, BucketCountThresholds bucketCountThresholds, AggregationContext aggregationContext, Aggregator parent,
SubAggCollectionMode subAggCollectMode, boolean showTermDocCountError, IncludeExclude.LongFilter longFilter,
List<PipelineAggregator> pipelineAggregators, Map<String, Object> metaData) throws IOException {
super(name, factories, aggregationContext, parent, bucketCountThresholds, order, subAggCollectMode, pipelineAggregators, metaData);
this.valuesSource = valuesSource;
this.showTermDocCountError = showTermDocCountError;
this.formatter = format.formatter();
this.longFilter = longFilter;
bucketOrds = new LongHash(1, aggregationContext.bigArrays());
}
开发者ID:baidu,项目名称:Elasticsearch,代码行数:12,代码来源:LongTermsAggregator.java
示例15: ScriptedMetricAggregatorFactory
import org.elasticsearch.search.aggregations.AggregatorFactories; //导入依赖的package包/类
public ScriptedMetricAggregatorFactory(String name, Function<Map<String, Object>, SearchScript> mapScript,
Function<Map<String, Object>, ExecutableScript> initScript, Function<Map<String, Object>, ExecutableScript> combineScript,
Script reduceScript, Map<String, Object> params, SearchContext context, AggregatorFactory<?> parent,
AggregatorFactories.Builder subFactories, Map<String, Object> metaData) throws IOException {
super(name, context, parent, subFactories, metaData);
this.mapScript = mapScript;
this.initScript = initScript;
this.combineScript = combineScript;
this.reduceScript = reduceScript;
this.params = params;
}
开发者ID:justor,项目名称:elasticsearch_my,代码行数:12,代码来源:ScriptedMetricAggregatorFactory.java
示例16: HDRPercentileRanksAggregatorFactory
import org.elasticsearch.search.aggregations.AggregatorFactories; //导入依赖的package包/类
public HDRPercentileRanksAggregatorFactory(String name, ValuesSourceConfig<Numeric> config, double[] values,
int numberOfSignificantValueDigits, boolean keyed, SearchContext context, AggregatorFactory<?> parent,
AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);
this.values = values;
this.numberOfSignificantValueDigits = numberOfSignificantValueDigits;
this.keyed = keyed;
}
开发者ID:justor,项目名称:elasticsearch_my,代码行数:9,代码来源:HDRPercentileRanksAggregatorFactory.java
示例17: TDigestPercentilesAggregatorFactory
import org.elasticsearch.search.aggregations.AggregatorFactories; //导入依赖的package包/类
public TDigestPercentilesAggregatorFactory(String name, ValuesSourceConfig<Numeric> config, double[] percents,
double compression, boolean keyed, SearchContext context, AggregatorFactory<?> parent,
AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);
this.percents = percents;
this.compression = compression;
this.keyed = keyed;
}
开发者ID:justor,项目名称:elasticsearch_my,代码行数:9,代码来源:TDigestPercentilesAggregatorFactory.java
示例18: GlobalOrdinalsStringTermsAggregator
import org.elasticsearch.search.aggregations.AggregatorFactories; //导入依赖的package包/类
public GlobalOrdinalsStringTermsAggregator(String name, AggregatorFactories factories, ValuesSource.Bytes.WithOrdinals valuesSource,
Terms.Order order, BucketCountThresholds bucketCountThresholds,
IncludeExclude.OrdinalsFilter includeExclude,
AggregationContext aggregationContext, Aggregator parent, SubAggCollectionMode collectionMode, boolean showTermDocCountError,
List<PipelineAggregator> pipelineAggregators, Map<String, Object> metaData) throws IOException {
super(name, factories, aggregationContext, parent, order, bucketCountThresholds, collectionMode, showTermDocCountError,
pipelineAggregators,
metaData);
this.valuesSource = valuesSource;
this.includeExclude = includeExclude;
}
开发者ID:baidu,项目名称:Elasticsearch,代码行数:12,代码来源:GlobalOrdinalsStringTermsAggregator.java
示例19: MultiValuesSourceAggregatorFactory
import org.elasticsearch.search.aggregations.AggregatorFactories; //导入依赖的package包/类
public MultiValuesSourceAggregatorFactory(String name,
List<NamedValuesSourceConfigSpec<VS>> configs,
SearchContext context, AggregatorFactory<?> parent,
AggregatorFactories.Builder subFactoriesBuilder,
Map<String, Object> metaData) throws IOException {
super(name, context, parent, subFactoriesBuilder, metaData);
this.configs = configs;
}
开发者ID:scaleborn,项目名称:elasticsearch-linear-regression,代码行数:9,代码来源:MultiValuesSourceAggregatorFactory.java
示例20: ReverseNestedAggregator
import org.elasticsearch.search.aggregations.AggregatorFactories; //导入依赖的package包/类
public ReverseNestedAggregator(String name, AggregatorFactories factories, ObjectMapper objectMapper,
AggregationContext aggregationContext, Aggregator parent, List<PipelineAggregator> pipelineAggregators, Map<String, Object> metaData)
throws IOException {
super(name, factories, aggregationContext, parent, pipelineAggregators, metaData);
if (objectMapper == null) {
parentFilter = Queries.newNonNestedFilter();
} else {
parentFilter = objectMapper.nestedTypeFilter();
}
parentBitsetProducer = context.searchContext().bitsetFilterCache().getBitSetProducer(parentFilter);
}
开发者ID:baidu,项目名称:Elasticsearch,代码行数:12,代码来源:ReverseNestedAggregator.java
注:本文中的org.elasticsearch.search.aggregations.AggregatorFactories类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论