congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
org.elasticsearch.search.aggregations.metrics.max
Code IndexAdd Tabnine to your IDE (free)

How to use org.elasticsearch.search.aggregations.metrics.max

Best Java code snippets using org.elasticsearch.search.aggregations.metrics.max (Showing top 20 results out of 315)

origin: org.elasticsearch/elasticsearch

@Override
public InternalAggregation buildEmptyAggregation() {
  return new InternalMax(name, Double.NEGATIVE_INFINITY, formatter, pipelineAggregators(), metaData());
}
origin: org.elasticsearch/elasticsearch

@Override
protected Aggregator createUnmapped(Aggregator parent,
    List<PipelineAggregator> pipelineAggregators, Map<String, Object> metaData) throws IOException {
  return new MaxAggregator(name, config, null, context, parent, pipelineAggregators, metaData);
}
origin: org.elasticsearch/elasticsearch

@Override
protected MaxAggregatorFactory innerBuild(SearchContext context, ValuesSourceConfig<Numeric> config,
    AggregatorFactory<?> parent, Builder subFactoriesBuilder) throws IOException {
  return new MaxAggregatorFactory(name, config, context, parent, subFactoriesBuilder, metaData);
}
origin: org.elasticsearch/elasticsearch

@Override
public InternalAggregation buildAggregation(long bucket) {
  if (valuesSource == null || bucket >= maxes.size()) {
    return buildEmptyAggregation();
  }
  return new InternalMax(name, maxes.get(bucket), formatter, pipelineAggregators(),  metaData());
}
origin: org.elasticsearch/elasticsearch

@Override
public InternalMax doReduce(List<InternalAggregation> aggregations, ReduceContext reduceContext) {
  double max = Double.NEGATIVE_INFINITY;
  for (InternalAggregation aggregation : aggregations) {
    max = Math.max(max, ((InternalMax) aggregation).max);
  }
  return new InternalMax(name, max, format, pipelineAggregators(), getMetaData());
}
origin: SonarSource/sonarqube

      AggregationBuilders.count(COUNT).field(FIELD_ISSUE_KEY))
     .subAggregation(
      AggregationBuilders.max("maxFuncCreatedAt").field(FIELD_ISSUE_FUNC_CREATED_AT))));
});
SearchResponse response = request.get();
    return Stream.empty();
   long lastIssueDate = (long) ((InternalMax) branchBucket.getAggregations().get("maxFuncCreatedAt")).getValue();
   return Stream.of(new ProjectStatistics(branchBucket.getKeyAsString(), count, lastIssueDate));
  }))
origin: Graylog2/graylog2-server

final FilterAggregationBuilder builder = AggregationBuilders.filter("agg", QueryBuilders.existsQuery(Message.FIELD_TIMESTAMP))
    .subAggregation(AggregationBuilders.min("ts_min").field(Message.FIELD_TIMESTAMP))
    .subAggregation(AggregationBuilders.max("ts_max").field(Message.FIELD_TIMESTAMP))
    .subAggregation(AggregationBuilders.terms("streams").field(Message.FIELD_STREAMS));
final String query = searchSource()
origin: org.elasticsearch/elasticsearch

/**
 * Create a new {@link Max} aggregation with the given name.
 */
public static MaxAggregationBuilder max(String name) {
  return new MaxAggregationBuilder(name);
}
origin: Impetus/Kundera

/**
 * Gets the aggregated result.
 * 
 * @param internalAggs
 *            the internal aggs
 * @param identifier
 *            the identifier
 * @param exp
 *            the exp
 * @return the aggregated result
 */
private Object getAggregatedResult(InternalAggregations internalAggs, String identifier, Expression exp)
{
  switch (identifier)
  {
  case Expression.MIN:
    return (((InternalMin) internalAggs.get(exp.toParsedText())).getValue());
  case Expression.MAX:
    return (((InternalMax) internalAggs.get(exp.toParsedText())).getValue());
  case Expression.AVG:
    return (((InternalAvg) internalAggs.get(exp.toParsedText())).getValue());
  case Expression.SUM:
    return (((InternalSum) internalAggs.get(exp.toParsedText())).getValue());
  case Expression.COUNT:
    return (((InternalValueCount) internalAggs.get(exp.toParsedText())).getValue());
  }
  throw new KunderaException("No support for " + identifier + " aggregation.");
}
origin: org.elasticsearch/elasticsearch

@Override
public double getValue() {
  return value();
}
origin: org.elasticsearch/elasticsearch

  public static ParsedMax fromXContent(XContentParser parser, final String name) {
    ParsedMax max = PARSER.apply(parser, null);
    max.setName(name);
    return max;
  }
}
origin: Impetus/Kundera

  break;
case Expression.MAX:
  aggregationBuilder = AggregationBuilders.max(function.toParsedText()).field(jPAColumnName);
  break;
case Expression.SUM:
origin: org.elasticsearch/elasticsearch

Number segMax = findLeafMaxValue(ctx.reader(), pointField, pointConverter);
if (segMax != null) {
origin: com.strapdata.elasticsearch/elasticsearch

@Override
public InternalAggregation buildEmptyAggregation() {
  return new InternalMax(name, Double.NEGATIVE_INFINITY, formatter, pipelineAggregators(), metaData());
}
origin: org.elasticsearch/elasticsearch

@Override
protected AggregationBuilder shallowCopy(Builder factoriesBuilder, Map<String, Object> metaData) {
  return new MaxAggregationBuilder(this, factoriesBuilder, metaData);
}
origin: org.elasticsearch/elasticsearch

  @Override
  protected Aggregator doCreateInternal(ValuesSource.Numeric valuesSource, Aggregator parent,
      boolean collectsFromSingleBucket, List<PipelineAggregator> pipelineAggregators, Map<String, Object> metaData)
          throws IOException {
    return new MaxAggregator(name, config, valuesSource, context, parent, pipelineAggregators, metaData);
  }
}
origin: com.strapdata.elasticsearch/elasticsearch

@Override
protected MaxAggregatorFactory innerBuild(SearchContext context, ValuesSourceConfig<Numeric> config,
    AggregatorFactory<?> parent, Builder subFactoriesBuilder) throws IOException {
  return new MaxAggregatorFactory(name, config, context, parent, subFactoriesBuilder, metaData);
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

@Override
public InternalAggregation buildEmptyAggregation() {
  return new InternalMax(name, Double.NEGATIVE_INFINITY, formatter, pipelineAggregators(), metaData());
}
origin: org.elasticsearch/elasticsearch

public static AggregationBuilder parse(String aggregationName, XContentParser parser) throws IOException {
  return PARSER.parse(parser, new MaxAggregationBuilder(aggregationName), null);
}
origin: com.strapdata.elasticsearch/elasticsearch

/**
 * Create a new {@link Max} aggregation with the given name.
 */
public static MaxAggregationBuilder max(String name) {
  return new MaxAggregationBuilder(name);
}
org.elasticsearch.search.aggregations.metrics.max

Most used classes

  • MaxAggregationBuilder
  • InternalMax
  • ParsedMax
  • Max
    An aggregation that computes the maximum of the values in the current bucket.
  • MaxBuilder
  • MaxAggregatorFactory,
  • MaxHelper$MaxImpl,
  • MaxHelper,
  • MaxAggregator$Factory
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now