diff --git a/output/schema/schema.json b/output/schema/schema.json index 350deb2a64..ddc92b1066 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -38615,7 +38615,7 @@ "name": "AggregateOrder", "namespace": "_types.aggregations" }, - "specLocation": "_types/aggregations/bucket.ts#L361-L363", + "specLocation": "_types/aggregations/bucket.ts#L365-L367", "type": { "items": [ { @@ -48030,7 +48030,7 @@ "name": "TermsAggregationCollectMode", "namespace": "_types.aggregations" }, - "specLocation": "_types/aggregations/bucket.ts#L365-L368" + "specLocation": "_types/aggregations/bucket.ts#L369-L372" }, { "kind": "enum", @@ -48052,7 +48052,7 @@ "name": "TermsAggregationExecutionHint", "namespace": "_types.aggregations" }, - "specLocation": "_types/aggregations/bucket.ts#L370-L375" + "specLocation": "_types/aggregations/bucket.ts#L374-L379" }, { "attachedBehaviors": [ @@ -48094,7 +48094,7 @@ "name": "TermsExclude", "namespace": "_types.aggregations" }, - "specLocation": "_types/aggregations/bucket.ts#L380-L381", + "specLocation": "_types/aggregations/bucket.ts#L384-L385", "type": { "items": [ { @@ -48129,7 +48129,7 @@ "name": "TermsInclude", "namespace": "_types.aggregations" }, - "specLocation": "_types/aggregations/bucket.ts#L377-L378", + "specLocation": "_types/aggregations/bucket.ts#L381-L382", "type": { "items": [ { @@ -48190,7 +48190,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L383-L386" + "specLocation": "_types/aggregations/bucket.ts#L387-L390" }, { "kind": "interface", @@ -48859,7 +48859,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L388-L393" + "specLocation": "_types/aggregations/bucket.ts#L392-L397" }, { "attachedBehaviors": [ diff --git a/specification/_types/aggregations/bucket.ts b/specification/_types/aggregations/bucket.ts index 567867d29d..2c04b5200c 100644 --- a/specification/_types/aggregations/bucket.ts +++ b/specification/_types/aggregations/bucket.ts @@ -358,6 +358,10 @@ export class TermsAggregation extends BucketAggregationBase { size?: integer } +// Note: ES is very lazy when parsing this data type: it accepts any number of properties in the objects below, +// but will only keep the *last* property in JSON document order and ignore others. +// This means that something like `"order": { "downloads": "desc", "_key": "asc" }` will actually be interpreted +// as `"order": [ { "_key": "asc" } ]` export type AggregateOrder = | SingleKeyDictionary | SingleKeyDictionary[]