File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -470,15 +470,19 @@ public void testReverseNestedAggWithoutNestedAgg() {
470470 public void testNonExistingNestedField () throws Exception {
471471 assertNoFailuresAndResponse (
472472 prepareSearch ("idx2" ).setQuery (matchAllQuery ())
473- .addAggregation (nested ("nested2" , "nested1.nested2" ).subAggregation (reverseNested ("incorrect" ).path ("nested3" ))),
473+ .addAggregation (nested ("nested2" , "nested1.nested2" ))
474+ .addAggregation (nested ("incorrect" , "nested1.incorrect" )),
474475 response -> {
475476
476477 SingleBucketAggregation nested = response .getAggregations ().get ("nested2" );
477478 assertThat (nested , notNullValue ());
478479 assertThat (nested .getName (), equalTo ("nested2" ));
480+ assertThat (nested .getDocCount (), is (27L ));
479481
480- SingleBucketAggregation reverseNested = nested .getAggregations ().get ("incorrect" );
481- assertThat (reverseNested .getDocCount (), is (0L ));
482+ SingleBucketAggregation incorrect = response .getAggregations ().get ("incorrect" );
483+ assertThat (incorrect , notNullValue ());
484+ assertThat (incorrect .getName (), equalTo ("incorrect" ));
485+ assertThat (incorrect .getDocCount (), is (0L ));
482486 }
483487 );
484488
You can’t perform that action at this time.
0 commit comments