From a2c95298c2d7c9245f145dae9cc73b4154348b63 Mon Sep 17 00:00:00 2001 From: Florian Bernd Date: Mon, 17 Jul 2023 16:05:45 +0200 Subject: [PATCH] Revert "Change type from `boolean` -> `Stringified` for `preserve_original` and `indexing_complete` (#2182) (#2188)" This reverts commit 457d84270f9b76bd001873f3cfd5efc9ccc84223. --- output/schema/schema.json | 106 +++--------------- output/typescript/types.ts | 16 +-- .../_types/analysis/token_filters.ts | 14 +-- specification/indices/_types/IndexSettings.ts | 2 +- 4 files changed, 33 insertions(+), 105 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index 62ed4501b4..fa5d81a480 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -49583,19 +49583,10 @@ "name": "preserve_original", "required": false, "type": { - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - ], "kind": "instance_of", "type": { - "name": "Stringified", - "namespace": "_spec_utils" + "name": "boolean", + "namespace": "_builtins" } } } @@ -50289,19 +50280,10 @@ "name": "preserve_original", "required": false, "type": { - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - ], "kind": "instance_of", "type": { - "name": "Stringified", - "namespace": "_spec_utils" + "name": "boolean", + "namespace": "_builtins" } } } @@ -52272,19 +52254,10 @@ "name": "preserve_original", "required": false, "type": { - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - ], "kind": "instance_of", "type": { - "name": "Stringified", - "namespace": "_spec_utils" + "name": "boolean", + "namespace": "_builtins" } } } @@ -52338,19 +52311,10 @@ "name": "preserve_original", "required": false, "type": { - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - ], "kind": "instance_of", "type": { - "name": "Stringified", - "namespace": "_spec_utils" + "name": "boolean", + "namespace": "_builtins" } } } @@ -52844,19 +52808,10 @@ "name": "preserve_original", "required": false, "type": { - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - ], "kind": "instance_of", "type": { - "name": "Stringified", - "namespace": "_spec_utils" + "name": "boolean", + "namespace": "_builtins" } } } @@ -55134,19 +55089,10 @@ "name": "preserve_original", "required": false, "type": { - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - ], "kind": "instance_of", "type": { - "name": "Stringified", - "namespace": "_spec_utils" + "name": "boolean", + "namespace": "_builtins" } } }, @@ -55316,19 +55262,10 @@ "name": "preserve_original", "required": false, "type": { - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - ], "kind": "instance_of", "type": { - "name": "Stringified", - "namespace": "_spec_utils" + "name": "boolean", + "namespace": "_builtins" } } }, @@ -96432,21 +96369,12 @@ "description": "Indicates whether or not the index has been rolled over. Automatically set to true when ILM completes the rollover action.\nYou can explicitly set it to skip rollover.", "name": "indexing_complete", "required": false, - "serverDefault": "false", + "serverDefault": false, "type": { - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - ], "kind": "instance_of", "type": { - "name": "Stringified", - "namespace": "_spec_utils" + "name": "boolean", + "namespace": "_builtins" } } }, diff --git a/output/typescript/types.ts b/output/typescript/types.ts index b1f0269b2e..159a6ac2f9 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -3800,7 +3800,7 @@ export type AnalysisAnalyzer = AnalysisCustomAnalyzer | AnalysisFingerprintAnaly export interface AnalysisAsciiFoldingTokenFilter extends AnalysisTokenFilterBase { type: 'asciifolding' - preserve_original?: SpecUtilsStringified + preserve_original?: boolean } export type AnalysisCharFilter = string | AnalysisCharFilterDefinition @@ -3880,7 +3880,7 @@ export interface AnalysisEdgeNGramTokenFilter extends AnalysisTokenFilterBase { max_gram?: integer min_gram?: integer side?: AnalysisEdgeNGramSide - preserve_original?: SpecUtilsStringified + preserve_original?: boolean } export interface AnalysisEdgeNGramTokenizer extends AnalysisTokenizerBase { @@ -4119,14 +4119,14 @@ export interface AnalysisMappingCharFilter extends AnalysisCharFilterBase { export interface AnalysisMultiplexerTokenFilter extends AnalysisTokenFilterBase { type: 'multiplexer' filters: string[] - preserve_original?: SpecUtilsStringified + preserve_original?: boolean } export interface AnalysisNGramTokenFilter extends AnalysisTokenFilterBase { type: 'ngram' max_gram?: integer min_gram?: integer - preserve_original?: SpecUtilsStringified + preserve_original?: boolean } export interface AnalysisNGramTokenizer extends AnalysisTokenizerBase { @@ -4183,7 +4183,7 @@ export interface AnalysisPatternAnalyzer { export interface AnalysisPatternCaptureTokenFilter extends AnalysisTokenFilterBase { type: 'pattern_capture' patterns: string[] - preserve_original?: SpecUtilsStringified + preserve_original?: boolean } export interface AnalysisPatternReplaceCharFilter extends AnalysisCharFilterBase { @@ -4396,7 +4396,7 @@ export interface AnalysisWordDelimiterGraphTokenFilter extends AnalysisTokenFilt generate_number_parts?: boolean generate_word_parts?: boolean ignore_keywords?: boolean - preserve_original?: SpecUtilsStringified + preserve_original?: boolean protected_words?: string[] protected_words_path?: string split_on_case_change?: boolean @@ -4413,7 +4413,7 @@ export interface AnalysisWordDelimiterTokenFilter extends AnalysisTokenFilterBas catenate_words?: boolean generate_number_parts?: boolean generate_word_parts?: boolean - preserve_original?: SpecUtilsStringified + preserve_original?: boolean protected_words?: string[] protected_words_path?: string split_on_case_change?: boolean @@ -9155,7 +9155,7 @@ export interface IndicesIndexSettingsAnalysis { export interface IndicesIndexSettingsLifecycle { name: Name - indexing_complete?: SpecUtilsStringified + indexing_complete?: boolean origination_date?: long parse_origination_date?: boolean step?: IndicesIndexSettingsLifecycleStep diff --git a/specification/_types/analysis/token_filters.ts b/specification/_types/analysis/token_filters.ts index d6e1ac4a0a..9f1ed0d35f 100644 --- a/specification/_types/analysis/token_filters.ts +++ b/specification/_types/analysis/token_filters.ts @@ -80,7 +80,7 @@ export class EdgeNGramTokenFilter extends TokenFilterBase { max_gram?: integer min_gram?: integer side?: EdgeNGramSide - preserve_original?: Stringified + preserve_original?: boolean } export class ShingleTokenFilter extends TokenFilterBase { @@ -135,7 +135,7 @@ export class WordDelimiterTokenFilter extends TokenFilterBase { catenate_words?: boolean generate_number_parts?: boolean generate_word_parts?: boolean - preserve_original?: Stringified + preserve_original?: boolean protected_words?: string[] protected_words_path?: string split_on_case_change?: boolean @@ -154,7 +154,7 @@ export class WordDelimiterGraphTokenFilter extends TokenFilterBase { generate_number_parts?: boolean generate_word_parts?: boolean ignore_keywords?: boolean - preserve_original?: Stringified + preserve_original?: boolean protected_words?: string[] protected_words_path?: string split_on_case_change?: boolean @@ -166,7 +166,7 @@ export class WordDelimiterGraphTokenFilter extends TokenFilterBase { export class AsciiFoldingTokenFilter extends TokenFilterBase { type: 'asciifolding' - preserve_original?: Stringified + preserve_original?: boolean } export class CommonGramsTokenFilter extends TokenFilterBase { @@ -259,14 +259,14 @@ export class LowercaseTokenFilter extends TokenFilterBase { export class MultiplexerTokenFilter extends TokenFilterBase { type: 'multiplexer' filters: string[] - preserve_original?: Stringified + preserve_original?: boolean } export class NGramTokenFilter extends TokenFilterBase { type: 'ngram' max_gram?: integer min_gram?: integer - preserve_original?: Stringified + preserve_original?: boolean } export class NoriPartOfSpeechTokenFilter extends TokenFilterBase { @@ -277,7 +277,7 @@ export class NoriPartOfSpeechTokenFilter extends TokenFilterBase { export class PatternCaptureTokenFilter extends TokenFilterBase { type: 'pattern_capture' patterns: string[] - preserve_original?: Stringified + preserve_original?: boolean } export class PatternReplaceTokenFilter extends TokenFilterBase { diff --git a/specification/indices/_types/IndexSettings.ts b/specification/indices/_types/IndexSettings.ts index 56bea2f9c1..0a7459e42d 100644 --- a/specification/indices/_types/IndexSettings.ts +++ b/specification/indices/_types/IndexSettings.ts @@ -344,7 +344,7 @@ export class IndexSettingsLifecycle { * You can explicitly set it to skip rollover. * @server_default false */ - indexing_complete?: Stringified + indexing_complete?: boolean /** * If specified, this is the timestamp used to calculate the index age for its phase transitions. Use this setting * if you create a new index that contains old data and want to use the original creation date to calculate the index