From 9ec13d555b8ca05076c1a3f493a1ff301a4e17a1 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Tue, 19 Sep 2023 11:19:18 +0400 Subject: [PATCH] Fix include/exclude type in Frequent Items agg --- 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 c037296fb6..3cf232c7ba 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -52494,26 +52494,11 @@ "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" + } } }, { @@ -52521,26 +52506,11 @@ "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 a8a8d66348..c852b07405 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -3309,8 +3309,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 f429759537..743817b12a 100644 --- a/specification/_types/aggregations/bucket.ts +++ b/specification/_types/aggregations/bucket.ts @@ -1148,12 +1148,12 @@ export class FrequentItemSetsField { * Values to exclude. * Can be regular expression strings or arrays of strings of exact terms. */ - exclude?: string | string[] + exclude?: TermsExclude /** * Values to include. * Can be regular expression strings or arrays of strings of exact terms. */ - include?: string | string[] + include?: TermsInclude } export class FrequentItemSetsAggregation {