From 7cda7da56bfcdca275c6e35f74ffd0e4e2f86499 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Wed, 20 Sep 2023 10:27:43 +0400 Subject: [PATCH] Fix include/exclude type in Frequent Items agg (#2280) --- output/schema/schema.json | 50 +++++---------------- output/typescript/types.ts | 4 +- specification/_types/aggregations/bucket.ts | 4 +- 3 files changed, 14 insertions(+), 44 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index e2cde226ee..b700c378b1 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -46610,52 +46610,22 @@ "name": "exclude", "required": false, "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - } - ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "TermsExclude", + "namespace": "_types.aggregations" + } } }, { "name": "include", "required": false, "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - } - ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "TermsInclude", + "namespace": "_types.aggregations" + } } } ], diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 43b8188352..948f436e73 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -3244,8 +3244,8 @@ export type AggregationsFrequentItemSetsBucket = AggregationsFrequentItemSetsBuc export interface AggregationsFrequentItemSetsField { field: Field - exclude?: string | string[] - include?: string | string[] + exclude?: AggregationsTermsExclude + include?: AggregationsTermsInclude } export type AggregationsGapPolicy = 'skip' | 'insert_zeros' | 'keep_values' diff --git a/specification/_types/aggregations/bucket.ts b/specification/_types/aggregations/bucket.ts index 88dbb1d2b0..2b7c4f53c2 100644 --- a/specification/_types/aggregations/bucket.ts +++ b/specification/_types/aggregations/bucket.ts @@ -544,8 +544,8 @@ export class IpPrefixAggregation extends BucketAggregationBase { export class FrequentItemSetsField { field: Field - exclude?: string | string[] - include?: string | string[] + exclude?: TermsExclude + include?: TermsInclude } export class FrequentItemSetsAggregation {