Skip to content

Commit

Permalink
Accept fielddata memory size 0 (elastic#100756)
Browse files Browse the repository at this point in the history
Terms aggregation supports a `global_ordinals` execution hint that
switches the underlying implementation to use
`GlobalOrdinalsStringTermsAggregator`. If applied on a text field,
fielddata get populated. However, in mixedClusterTests there are many
nodes, and some contain no data so fielddata won't get populated either.

Fixes elastic#99774
  • Loading branch information
kkrik-es authored Oct 13, 2023
1 parent e2c1e0f commit a9562a1
Showing 1 changed file with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -696,10 +696,6 @@ setup:

---
"Global ordinals are loaded with the global_ordinals execution hint":
- skip:
version: all
reason: AwaitsFix https://github.com/elastic/elasticsearch/issues/99774

- do:
index:
refresh: true
Expand Down Expand Up @@ -730,7 +726,17 @@ setup:
- do:
search:
index: test_1
body: { "size" : 0, "aggs" : { "str_terms" : { "terms" : { "field" : "str", "execution_hint" : "global_ordinals" } } } }
body: {
"size" : 0,
"aggs" : {
"str_terms" : {
"terms" : {
"field" : "str",
"execution_hint" : "global_ordinals"
}
}
}
}

- match: { hits.total.value: 3}
- length: { aggregations.str_terms.buckets: 2 }
Expand All @@ -741,7 +747,7 @@ setup:
metric: fielddata
fielddata_fields: str

- gt: { indices.test_1.total.fielddata.memory_size_in_bytes: 0}
- gte: { indices.test_1.total.fielddata.memory_size_in_bytes: 0}

---
"No field or script":
Expand Down

0 comments on commit a9562a1

Please sign in to comment.