Skip to content

Commit 639782d

Browse files
authored
Break up a test for with runtime fields (brings #60931 to master) (#61103) (#61114)
Breaks up an integration test into one that runtime fields can run and one that runtime fields have to skip. This is because runtime fields don't have global ords and we assert things *about* global ords in the test we have to skip.
1 parent 81b8024 commit 639782d

File tree

1 file changed

+50
-31
lines changed
  • rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation

1 file changed

+50
-31
lines changed

rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/20_terms.yml

Lines changed: 50 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ setup:
779779
body: { "size" : 0, "aggs" : { "no_field_terms" : { "terms" : { "size": 1 } } } }
780780

781781
---
782-
"string profiler":
782+
"string profiler via global ordinals":
783783
- skip:
784784
version: " - 7.8.99"
785785
reason: debug information added in 7.9.0
@@ -831,36 +831,6 @@ setup:
831831
- match: { profile.shards.0.aggregations.0.children.0.type: MaxAggregator }
832832
- match: { profile.shards.0.aggregations.0.children.0.description: max_number }
833833

834-
- do:
835-
search:
836-
index: test_1
837-
body:
838-
profile: true
839-
size: 0
840-
aggs:
841-
str_terms:
842-
terms:
843-
field: str
844-
collect_mode: breadth_first
845-
execution_hint: map
846-
aggs:
847-
max_number:
848-
max:
849-
field: number
850-
- match: { aggregations.str_terms.buckets.0.key: sheep }
851-
- match: { aggregations.str_terms.buckets.0.max_number.value: 3 }
852-
- match: { aggregations.str_terms.buckets.1.key: cow }
853-
- match: { aggregations.str_terms.buckets.1.max_number.value: 1 }
854-
- match: { aggregations.str_terms.buckets.2.key: pig }
855-
- match: { aggregations.str_terms.buckets.2.max_number.value: 1 }
856-
- match: { profile.shards.0.aggregations.0.type: MapStringTermsAggregator }
857-
- match: { profile.shards.0.aggregations.0.description: str_terms }
858-
- match: { profile.shards.0.aggregations.0.breakdown.collect_count: 4 }
859-
- match: { profile.shards.0.aggregations.0.debug.deferred_aggregators: [ max_number ] }
860-
- match: { profile.shards.0.aggregations.0.debug.result_strategy: terms }
861-
- match: { profile.shards.0.aggregations.0.children.0.type: MaxAggregator }
862-
- match: { profile.shards.0.aggregations.0.children.0.description: max_number }
863-
864834
- do:
865835
indices.create:
866836
index: test_3
@@ -912,6 +882,55 @@ setup:
912882
- match: { profile.shards.0.aggregations.0.children.0.type: MaxAggregator }
913883
- match: { profile.shards.0.aggregations.0.children.0.description: max_number }
914884

885+
---
886+
"string profiler via map":
887+
- skip:
888+
version: " - 7.8.99"
889+
reason: debug information added in 7.9.0
890+
- do:
891+
bulk:
892+
index: test_1
893+
refresh: true
894+
body: |
895+
{ "index": {} }
896+
{ "str": "sheep", "number": 1 }
897+
{ "index": {} }
898+
{ "str": "sheep", "number": 3 }
899+
{ "index": {} }
900+
{ "str": "cow", "number": 1 }
901+
{ "index": {} }
902+
{ "str": "pig", "number": 1 }
903+
904+
- do:
905+
search:
906+
index: test_1
907+
body:
908+
profile: true
909+
size: 0
910+
aggs:
911+
str_terms:
912+
terms:
913+
field: str
914+
collect_mode: breadth_first
915+
execution_hint: map
916+
aggs:
917+
max_number:
918+
max:
919+
field: number
920+
- match: { aggregations.str_terms.buckets.0.key: sheep }
921+
- match: { aggregations.str_terms.buckets.0.max_number.value: 3 }
922+
- match: { aggregations.str_terms.buckets.1.key: cow }
923+
- match: { aggregations.str_terms.buckets.1.max_number.value: 1 }
924+
- match: { aggregations.str_terms.buckets.2.key: pig }
925+
- match: { aggregations.str_terms.buckets.2.max_number.value: 1 }
926+
- match: { profile.shards.0.aggregations.0.type: MapStringTermsAggregator }
927+
- match: { profile.shards.0.aggregations.0.description: str_terms }
928+
- match: { profile.shards.0.aggregations.0.breakdown.collect_count: 4 }
929+
- match: { profile.shards.0.aggregations.0.debug.deferred_aggregators: [ max_number ] }
930+
- match: { profile.shards.0.aggregations.0.debug.result_strategy: terms }
931+
- match: { profile.shards.0.aggregations.0.children.0.type: MaxAggregator }
932+
- match: { profile.shards.0.aggregations.0.children.0.description: max_number }
933+
915934
---
916935
"numeric profiler":
917936
- skip:

0 commit comments

Comments
 (0)