Tabnine Logo
NestedAggregationBuilder.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.elasticsearch.search.aggregations.bucket.nested.NestedAggregationBuilder
constructor

Best Java code snippets using org.elasticsearch.search.aggregations.bucket.nested.NestedAggregationBuilder.<init> (Showing top 11 results out of 315)

origin: org.elasticsearch/elasticsearch

/**
 * Create a new {@link Nested} aggregation with the given name.
 */
public static NestedAggregationBuilder nested(String name, String path) {
  return new NestedAggregationBuilder(name, path);
}
origin: org.elasticsearch/elasticsearch

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

/**
 * Create a new {@link Nested} aggregation with the given name.
 */
public static NestedAggregationBuilder nested(String name, String path) {
  return new NestedAggregationBuilder(name, path);
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

/**
 * Create a new {@link Nested} aggregation with the given name.
 */
public static NestedAggregationBuilder nested(String name, String path) {
  return new NestedAggregationBuilder(name, path);
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

@Override
protected AggregationBuilder shallowCopy(Builder factoriesBuilder, Map<String, Object> metaData) {
  return new NestedAggregationBuilder(this, factoriesBuilder, metaData);
}
origin: apache/servicemix-bundles

/**
 * Create a new {@link Nested} aggregation with the given name.
 */
public static NestedAggregationBuilder nested(String name, String path) {
  return new NestedAggregationBuilder(name, path);
}
origin: apache/servicemix-bundles

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

public static NestedAggregationBuilder parse(String aggregationName, XContentParser parser) throws IOException {
  String path = null;
  XContentParser.Token token;
  String currentFieldName = null;
  while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) {
    if (token == XContentParser.Token.FIELD_NAME) {
      currentFieldName = parser.currentName();
    } else if (token == XContentParser.Token.VALUE_STRING) {
      if (NestedAggregator.PATH_FIELD.match(currentFieldName, parser.getDeprecationHandler())) {
        path = parser.text();
      } else {
        throw new ParsingException(parser.getTokenLocation(),
            "Unknown key for a " + token + " in [" + aggregationName + "]: [" + currentFieldName + "].");
      }
    } else {
      throw new ParsingException(parser.getTokenLocation(), "Unexpected token " + token + " in [" + aggregationName + "].");
    }
  }
  if (path == null) {
    // "field" doesn't exist, so we fall back to the context of the ancestors
    throw new ParsingException(parser.getTokenLocation(), "Missing [path] field for nested aggregation [" + aggregationName + "]");
  }
  return new NestedAggregationBuilder(aggregationName, path);
}
origin: com.strapdata.elasticsearch/elasticsearch

public static NestedAggregationBuilder parse(String aggregationName, QueryParseContext context) throws IOException {
  String path = null;
  XContentParser.Token token;
  String currentFieldName = null;
  XContentParser parser = context.parser();
  while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) {
    if (token == XContentParser.Token.FIELD_NAME) {
      currentFieldName = parser.currentName();
    } else if (token == XContentParser.Token.VALUE_STRING) {
      if (NestedAggregator.PATH_FIELD.match(currentFieldName)) {
        path = parser.text();
      } else {
        throw new ParsingException(parser.getTokenLocation(),
            "Unknown key for a " + token + " in [" + aggregationName + "]: [" + currentFieldName + "].");
      }
    } else {
      throw new ParsingException(parser.getTokenLocation(), "Unexpected token " + token + " in [" + aggregationName + "].");
    }
  }
  if (path == null) {
    // "field" doesn't exist, so we fall back to the context of the ancestors
    throw new ParsingException(parser.getTokenLocation(), "Missing [path] field for nested aggregation [" + aggregationName + "]");
  }
  return new NestedAggregationBuilder(aggregationName, path);
}
origin: apache/servicemix-bundles

public static NestedAggregationBuilder parse(String aggregationName, XContentParser parser) throws IOException {
  String path = null;
  XContentParser.Token token;
  String currentFieldName = null;
  while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) {
    if (token == XContentParser.Token.FIELD_NAME) {
      currentFieldName = parser.currentName();
    } else if (token == XContentParser.Token.VALUE_STRING) {
      if (NestedAggregator.PATH_FIELD.match(currentFieldName, parser.getDeprecationHandler())) {
        path = parser.text();
      } else {
        throw new ParsingException(parser.getTokenLocation(),
            "Unknown key for a " + token + " in [" + aggregationName + "]: [" + currentFieldName + "].");
      }
    } else {
      throw new ParsingException(parser.getTokenLocation(), "Unexpected token " + token + " in [" + aggregationName + "].");
    }
  }
  if (path == null) {
    // "field" doesn't exist, so we fall back to the context of the ancestors
    throw new ParsingException(parser.getTokenLocation(), "Missing [path] field for nested aggregation [" + aggregationName + "]");
  }
  return new NestedAggregationBuilder(aggregationName, path);
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

public static NestedAggregationBuilder parse(String aggregationName, XContentParser parser) throws IOException {
  String path = null;
  XContentParser.Token token;
  String currentFieldName = null;
  while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) {
    if (token == XContentParser.Token.FIELD_NAME) {
      currentFieldName = parser.currentName();
    } else if (token == XContentParser.Token.VALUE_STRING) {
      if (NestedAggregator.PATH_FIELD.match(currentFieldName, parser.getDeprecationHandler())) {
        path = parser.text();
      } else {
        throw new ParsingException(parser.getTokenLocation(),
            "Unknown key for a " + token + " in [" + aggregationName + "]: [" + currentFieldName + "].");
      }
    } else {
      throw new ParsingException(parser.getTokenLocation(), "Unexpected token " + token + " in [" + aggregationName + "].");
    }
  }
  if (path == null) {
    // "field" doesn't exist, so we fall back to the context of the ancestors
    throw new ParsingException(parser.getTokenLocation(), "Missing [path] field for nested aggregation [" + aggregationName + "]");
  }
  return new NestedAggregationBuilder(aggregationName, path);
}
org.elasticsearch.search.aggregations.bucket.nestedNestedAggregationBuilder<init>

Popular methods of NestedAggregationBuilder

  • subAggregation

Popular in Java

  • Making http post requests using okhttp
  • getContentResolver (Context)
  • runOnUiThread (Activity)
  • getSharedPreferences (Context)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • From CI to AI: The AI layer in your organization
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