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 708
708
- match : { aggregations.tm.top.1.sort: [2] }
709
709
- match : { aggregations.tm.top.2.metrics.animal\.keyword: null}
710
710
- match : { aggregations.tm.top.2.sort: [3] }
711
+
712
+ ---
713
+ " with flattened " :
714
+ - do :
715
+ indices.create :
716
+ index : test
717
+ body :
718
+ mappings :
719
+ properties :
720
+ host :
721
+ type : flattened
722
+
723
+ - do :
724
+ bulk :
725
+ index : test
726
+ refresh : true
727
+ body :
728
+ - ' {"index": {}}'
729
+ - ' {"host": {"hostname": "abc", "name": "x"}, "v": 1}'
730
+ - ' {"index": {}}'
731
+ - ' {"host": {"hostname": "foo", "name": "y"}, "v": 2}'
732
+ - ' {"index": {}}'
733
+ - ' {"host": {"hostname": "bar", "name": "z"}, "v": 3}'
734
+
735
+ - do :
736
+ search :
737
+ index : test
738
+ size : 0
739
+ body :
740
+ aggs :
741
+ tm :
742
+ top_metrics :
743
+ metrics :
744
+ field : host.hostname
745
+ sort :
746
+ v : asc
747
+ size : 3
748
+ - match : { aggregations.tm.top.0.sort: [1] }
749
+ - match : { aggregations.tm.top.0.metrics.host\.hostname: abc }
You can’t perform that action at this time.
0 commit comments