Package org.elasticsearch.search.aggregations.support

Examples of org.elasticsearch.search.aggregations.support.ValuesSourceParser.config()


        bucketCountThresholds.ensureValidity();
        SignificanceHeuristic significanceHeuristic = aggParser.getSignificanceHeuristic();
        if (significanceHeuristic == null) {
            significanceHeuristic = JLHScore.INSTANCE;
        }
        return new SignificantTermsAggregatorFactory(aggregationName, vsParser.config(), bucketCountThresholds, aggParser.getIncludeExclude(), aggParser.getExecutionHint(), aggParser.getFilter(), significanceHeuristic);
    }
}
View Full Code Here


            // The user has not made a shardSize selection. Use default heuristic to avoid any wrong-ranking caused by distributed counting
            bucketCountThresholds.setShardSize(BucketUtils.suggestShardSideQueueSize(bucketCountThresholds.getRequiredSize(),
                    context.numberOfShards()));
        }
        bucketCountThresholds.ensureValidity();
        return new TermsAggregatorFactory(aggregationName, vsParser.config(), order, bucketCountThresholds, aggParser.getIncludeExclude(), aggParser.getExecutionHint(), aggParser.getCollectionMode(), aggParser.showTermDocCountError());
    }

    static Terms.Order resolveOrder(String key, boolean asc) {
        if ("_term".equals(key)) {
            return Order.term(asc);
View Full Code Here

        if (extendedBounds != null) {
            // with numeric histogram, we can process here and fail fast if the bounds are invalid
            extendedBounds.processAndValidate(aggregationName, context, ValueParser.RAW);
        }

        return new HistogramAggregator.Factory(aggregationName, vsParser.config(), rounding, order, keyed, minDocCount, extendedBounds, InternalHistogram.FACTORY);

    }

    static InternalOrder resolveOrder(String key, boolean asc) {
        if ("_key".equals(key)) {
View Full Code Here

                .preZone(preZone).postZone(postZone)
                .preZoneAdjustLargeInterval(preZoneAdjustLargeInterval)
                .preOffset(preOffset).postOffset(postOffset)
                .build();

        return new HistogramAggregator.Factory(aggregationName, vsParser.config(), rounding, order, keyed, minDocCount, extendedBounds, InternalDateHistogram.FACTORY);

    }

    private static InternalOrder resolveOrder(String key, boolean asc) {
        if ("_key".equals(key) || "_time".equals(key)) {
View Full Code Here

            } else {
                throw new SearchParseException(context, "Unexpected token " + token + " in [" + aggregationName + "].");
            }
        }

        return new MissingAggregator.Factory(aggregationName, vsParser.config());
    }
}
View Full Code Here

            } else if (!vsParser.token(currentFieldName, token, parser)) {
                throw new SearchParseException(context, "Unexpected token " + token + " in [" + aggregationName + "].");
            }
        }

        return new ValueCountAggregator.Factory(aggregationName, vsParser.config());
    }
}
View Full Code Here

            } else {
                throw new SearchParseException(context, "Unexpected token " + token + " in [" + name + "].");
            }
        }

        ValuesSourceConfig<?> config = vsParser.config();

        if (rehash == null && config.fieldContext() != null && config.fieldContext().mapper() instanceof Murmur3FieldMapper) {
            rehash = false;
        } else if (rehash == null) {
            rehash = true;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.