use of org.elasticsearch.search.aggregations.PipelineAggregationBuilder in project elasticsearch by elastic.
the class MovAvgTests method testDefaultParsing.
public void testDefaultParsing() throws Exception {
MovAvgPipelineAggregationBuilder expected = new MovAvgPipelineAggregationBuilder("commits_moving_avg", "commits");
String json = "{" + " \"commits_moving_avg\": {" + " \"moving_avg\": {" + " \"buckets_path\": \"commits\"" + " }" + " }" + "}";
PipelineAggregationBuilder newAgg = parse(createParser(JsonXContent.jsonXContent, json));
assertNotSame(newAgg, expected);
assertEquals(expected, newAgg);
assertEquals(expected.hashCode(), newAgg.hashCode());
}
Aggregations