Skip to content

Commit 1ae9878

Browse files
authored
Break up a test for with runtime fields (brings #60931 to master) (#61103)
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 c41357b commit 1ae9878

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
@@ -724,7 +724,7 @@ setup:
724724
body: { "size" : 0, "aggs" : { "no_field_terms" : { "terms" : { "size": 1 } } } }
725725

726726
---
727-
"string profiler":
727+
"string profiler via global ordinals":
728728
- skip:
729729
version: " - 7.8.99"
730730
reason: debug information added in 7.9.0
@@ -776,36 +776,6 @@ setup:
776776
- match: { profile.shards.0.aggregations.0.children.0.type: MaxAggregator }
777777
- match: { profile.shards.0.aggregations.0.children.0.description: max_number }
778778

779-
- do:
780-
search:
781-
index: test_1
782-
body:
783-
profile: true
784-
size: 0
785-
aggs:
786-
str_terms:
787-
terms:
788-
field: str
789-
collect_mode: breadth_first
790-
execution_hint: map
791-
aggs:
792-
max_number:
793-
max:
794-
field: number
795-
- match: { aggregations.str_terms.buckets.0.key: sheep }
796-
- match: { aggregations.str_terms.buckets.0.max_number.value: 3 }
797-
- match: { aggregations.str_terms.buckets.1.key: cow }
798-
- match: { aggregations.str_terms.buckets.1.max_number.value: 1 }
799-
- match: { aggregations.str_terms.buckets.2.key: pig }
800-
- match: { aggregations.str_terms.buckets.2.max_number.value: 1 }
801-
- match: { profile.shards.0.aggregations.0.type: MapStringTermsAggregator }
802-
- match: { profile.shards.0.aggregations.0.description: str_terms }
803-
- match: { profile.shards.0.aggregations.0.breakdown.collect_count: 4 }
804-
- match: { profile.shards.0.aggregations.0.debug.deferred_aggregators: [ max_number ] }
805-
- match: { profile.shards.0.aggregations.0.debug.result_strategy: terms }
806-
- match: { profile.shards.0.aggregations.0.children.0.type: MaxAggregator }
807-
- match: { profile.shards.0.aggregations.0.children.0.description: max_number }
808-
809779
- do:
810780
indices.create:
811781
index: test_3
@@ -857,6 +827,55 @@ setup:
857827
- match: { profile.shards.0.aggregations.0.children.0.type: MaxAggregator }
858828
- match: { profile.shards.0.aggregations.0.children.0.description: max_number }
859829

830+
---
831+
"string profiler via map":
832+
- skip:
833+
version: " - 7.8.99"
834+
reason: debug information added in 7.9.0
835+
- do:
836+
bulk:
837+
index: test_1
838+
refresh: true
839+
body: |
840+
{ "index": {} }
841+
{ "str": "sheep", "number": 1 }
842+
{ "index": {} }
843+
{ "str": "sheep", "number": 3 }
844+
{ "index": {} }
845+
{ "str": "cow", "number": 1 }
846+
{ "index": {} }
847+
{ "str": "pig", "number": 1 }
848+
849+
- do:
850+
search:
851+
index: test_1
852+
body:
853+
profile: true
854+
size: 0
855+
aggs:
856+
str_terms:
857+
terms:
858+
field: str
859+
collect_mode: breadth_first
860+
execution_hint: map
861+
aggs:
862+
max_number:
863+
max:
864+
field: number
865+
- match: { aggregations.str_terms.buckets.0.key: sheep }
866+
- match: { aggregations.str_terms.buckets.0.max_number.value: 3 }
867+
- match: { aggregations.str_terms.buckets.1.key: cow }
868+
- match: { aggregations.str_terms.buckets.1.max_number.value: 1 }
869+
- match: { aggregations.str_terms.buckets.2.key: pig }
870+
- match: { aggregations.str_terms.buckets.2.max_number.value: 1 }
871+
- match: { profile.shards.0.aggregations.0.type: MapStringTermsAggregator }
872+
- match: { profile.shards.0.aggregations.0.description: str_terms }
873+
- match: { profile.shards.0.aggregations.0.breakdown.collect_count: 4 }
874+
- match: { profile.shards.0.aggregations.0.debug.deferred_aggregators: [ max_number ] }
875+
- match: { profile.shards.0.aggregations.0.debug.result_strategy: terms }
876+
- match: { profile.shards.0.aggregations.0.children.0.type: MaxAggregator }
877+
- match: { profile.shards.0.aggregations.0.children.0.description: max_number }
878+
860879
---
861880
"numeric profiler":
862881
- skip:

0 commit comments

Comments
 (0)