File tree 1 file changed +39
-0
lines changed
x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/analytics
1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 668
668
- match : { aggregations.tm.top.1.sort: [2] }
669
669
- match : { aggregations.tm.top.2.metrics.animal\.keyword: null}
670
670
- match : { aggregations.tm.top.2.sort: [3] }
671
+
672
+ ---
673
+ " with flattened " :
674
+ - do :
675
+ indices.create :
676
+ index : test
677
+ body :
678
+ mappings :
679
+ properties :
680
+ host :
681
+ type : flattened
682
+
683
+ - do :
684
+ bulk :
685
+ index : test
686
+ refresh : true
687
+ body :
688
+ - ' {"index": {}}'
689
+ - ' {"host": {"hostname": "abc", "name": "x"}, "v": 1}'
690
+ - ' {"index": {}}'
691
+ - ' {"host": {"hostname": "foo", "name": "y"}, "v": 2}'
692
+ - ' {"index": {}}'
693
+ - ' {"host": {"hostname": "bar", "name": "z"}, "v": 3}'
694
+
695
+ - do :
696
+ search :
697
+ index : test
698
+ size : 0
699
+ body :
700
+ aggs :
701
+ tm :
702
+ top_metrics :
703
+ metrics :
704
+ field : host.hostname
705
+ sort :
706
+ v : asc
707
+ size : 3
708
+ - match : { aggregations.tm.top.0.sort: [1] }
709
+ - match : { aggregations.tm.top.0.metrics.host\.hostname: abc }
You can’t perform that action at this time.
0 commit comments