From 5c99a46ac881a23f92ebd911ab431d14a31fcc45 Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Mon, 5 May 2025 06:04:16 +0000 Subject: [PATCH] Auto-generated API code --- docs/reference/api-reference.md | 19 +- src/api/types.ts | 400 ++++++++++++++++++++++++++++---- 2 files changed, 373 insertions(+), 46 deletions(-) diff --git a/docs/reference/api-reference.md b/docs/reference/api-reference.md index d3a6db5b8..b785ce7ba 100644 --- a/docs/reference/api-reference.md +++ b/docs/reference/api-reference.md @@ -1683,7 +1683,7 @@ client.search({ ... }) - **`include_named_queries_score` (Optional, boolean)**: If `true`, the response includes the score contribution from any named queries. This functionality reruns each named query on every hit in a search response. Typically, this adds a small overhead to a request. However, using computationally expensive named queries on a large number of hits may add significant overhead. - **`lenient` (Optional, boolean)**: If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. This parameter can be used only when the `q` query string parameter is specified. - **`max_concurrent_shard_requests` (Optional, number)**: The number of concurrent shard requests per node that the search runs concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests. -- **`preference` (Optional, string)**: The nodes and shards used for the search. By default, Elasticsearch selects from eligible nodes and shards using adaptive replica selection, accounting for allocation awareness. Valid values are: * `_only_local` to run the search only on shards on the local node. * `_local` to, if possible, run the search on shards on the local node, or if not, select shards using the default method. * `_only_nodes:,` to run the search on only the specified nodes IDs. If suitable shards exist on more than one selected node, use shards on those nodes using the default method. If none of the specified nodes are available, select shards from any available node using the default method. * `_prefer_nodes:,` to if possible, run the search on the specified nodes IDs. If not, select shards using the default method. `_shards:,` to run the search only on the specified shards. You can combine this value with other `preference` values. However, the `_shards` value must come first. For example: `_shards:2,3|_local`. `` (any string that does not start with `_`) to route searches with the same `` to the same shards in the same order. +- **`preference` (Optional, string)**: The nodes and shards used for the search. By default, Elasticsearch selects from eligible nodes and shards using adaptive replica selection, accounting for allocation awareness. Valid values are: * `_only_local` to run the search only on shards on the local node. * `_local` to, if possible, run the search on shards on the local node, or if not, select shards using the default method. * `_only_nodes:,` to run the search on only the specified nodes IDs. If suitable shards exist on more than one selected node, use shards on those nodes using the default method. If none of the specified nodes are available, select shards from any available node using the default method. * `_prefer_nodes:,` to if possible, run the search on the specified nodes IDs. If not, select shards using the default method. * `_shards:,` to run the search only on the specified shards. You can combine this value with other `preference` values. However, the `_shards` value must come first. For example: `_shards:2,3|_local`. * `` (any string that does not start with `_`) to route searches with the same `` to the same shards in the same order. - **`pre_filter_shard_size` (Optional, number)**: A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method (if date filters are mandatory to match but the shard bounds and the query are disjoint). When unspecified, the pre-filter phase is executed if any of these conditions is met: * The request targets more than 128 shards. * The request targets one or more read-only index. * The primary sort of the query targets an indexed field. - **`request_cache` (Optional, boolean)**: If `true`, the caching of search results is enabled for requests where `size` is `0`. It defaults to index level settings. - **`routing` (Optional, string)**: A custom value that is used to route operations to a specific shard. @@ -4777,6 +4777,9 @@ By default, the request waits for 1 second for the query results. If the query completes during this period, results are returned Otherwise, a query ID is returned that can later be used to retrieve the results. - **`allow_partial_results` (Optional, boolean)**: If `true`, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards. +If `false`, the query will fail if there are any failures. + +To override the default behavior, you can set the `esql.query.allow_partial_results` cluster setting to `false`. - **`delimiter` (Optional, string)**: The character to use between values within a CSV row. It is valid only for the CSV format. - **`drop_null_columns` (Optional, boolean)**: Indicates whether columns that are entirely `null` will be removed from the `columns` and `values` portion of the results. @@ -4911,6 +4914,9 @@ count. - **`drop_null_columns` (Optional, boolean)**: Should columns that are entirely `null` be removed from the `columns` and `values` portion of the results? Defaults to `false`. If `true` then the response will include an extra section under the name `all_columns` which has the name of all columns. - **`allow_partial_results` (Optional, boolean)**: If `true`, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards. +If `false`, the query will fail if there are any failures. + +To override the default behavior, you can set the `esql.query.allow_partial_results` cluster setting to `false`. ## client.features.getFeatures [_features.get_features] Get the features. @@ -5437,7 +5443,7 @@ This could be a built-in analyzer, or an analyzer that’s been configured in th - **`field` (Optional, string)**: Field used to derive the analyzer. To use this parameter, you must specify an index. If specified, the `analyzer` parameter overrides this value. -- **`filter` (Optional, string | { type, preserve_original } | { type, common_words, common_words_path, ignore_case, query_mode } | { type, filter, script } | { type, delimiter, encoding } | { type, max_gram, min_gram, side, preserve_original } | { type, articles, articles_path, articles_case } | { type, max_output_size, separator } | { type, dedup, dictionary, locale, longest_only } | { type } | { type, mode, types } | { type, keep_words, keep_words_case, keep_words_path } | { type, ignore_case, keywords, keywords_path, keywords_pattern } | { type } | { type, max, min } | { type, consume_all_tokens, max_token_count } | { type, language } | { type, filters, preserve_original } | { type, max_gram, min_gram, preserve_original } | { type, stoptags } | { type, patterns, preserve_original } | { type, all, flags, pattern, replacement } | { type } | { type, script } | { type } | { type } | { type, filler_token, max_shingle_size, min_shingle_size, output_unigrams, output_unigrams_if_no_shingles, token_separator } | { type, language } | { type, rules, rules_path } | { type, language } | { type, ignore_case, remove_trailing, stopwords, stopwords_path } | { type, expand, format, lenient, synonyms, synonyms_path, synonyms_set, tokenizer, updateable } | { type, expand, format, lenient, synonyms, synonyms_path, synonyms_set, tokenizer, updateable } | { type } | { type, length } | { type, only_on_same_position } | { type } | { type, adjust_offsets, catenate_all, catenate_numbers, catenate_words, generate_number_parts, generate_word_parts, ignore_keywords, preserve_original, protected_words, protected_words_path, split_on_case_change, split_on_numerics, stem_english_possessive, type_table, type_table_path } | { type, catenate_all, catenate_numbers, catenate_words, generate_number_parts, generate_word_parts, preserve_original, protected_words, protected_words_path, split_on_case_change, split_on_numerics, stem_english_possessive, type_table, type_table_path } | { type, minimum_length } | { type, use_romaji } | { type, stoptags } | { type, alternate, case_first, case_level, country, decomposition, hiragana_quaternary_mode, language, numeric, rules, strength, variable_top, variant } | { type, unicode_set_filter } | { type, name } | { type, dir, id } | { type, encoder, languageset, max_code_len, name_type, replace, rule_type } | { type }[])**: Array of token filters used to apply after the tokenizer. +- **`filter` (Optional, string | { type } | { type } | { type, preserve_original } | { type, ignored_scripts, output_unigrams } | { type } | { type } | { type, common_words, common_words_path, ignore_case, query_mode } | { type, filter, script } | { type } | { type, delimiter, encoding } | { type, max_gram, min_gram, side, preserve_original } | { type, articles, articles_path, articles_case } | { type, max_output_size, separator } | { type } | { type } | { type } | { type, dedup, dictionary, locale, longest_only } | { type, hyphenation_patterns_path, no_sub_matches, no_overlapping_matches } | { type } | { type, mode, types } | { type, keep_words, keep_words_case, keep_words_path } | { type, ignore_case, keywords, keywords_path, keywords_pattern } | { type } | { type } | { type, max, min } | { type, consume_all_tokens, max_token_count } | { type, language } | { type, bucket_count, hash_count, hash_set_size, with_rotation } | { type, filters, preserve_original } | { type, max_gram, min_gram, preserve_original } | { type, stoptags } | { type, patterns, preserve_original } | { type, all, pattern, replacement } | { type } | { type } | { type, script } | { type } | { type } | { type } | { type } | { type } | { type, filler_token, max_shingle_size, min_shingle_size, output_unigrams, output_unigrams_if_no_shingles, token_separator } | { type, language } | { type } | { type, rules, rules_path } | { type, language } | { type, ignore_case, remove_trailing, stopwords, stopwords_path } | { type } | { type } | { type } | { type, length } | { type, only_on_same_position } | { type } | { type, adjust_offsets, ignore_keywords } | { type } | { type, stopwords } | { type, minimum_length } | { type, use_romaji } | { type, stoptags } | { type, alternate, case_first, case_level, country, decomposition, hiragana_quaternary_mode, language, numeric, rules, strength, variable_top, variant } | { type, unicode_set_filter } | { type, name } | { type, dir, id } | { type, encoder, languageset, max_code_len, name_type, replace, rule_type } | { type }[])**: Array of token filters used to apply after the tokenizer. - **`normalizer` (Optional, string)**: Normalizer to use to convert text into a single token. - **`text` (Optional, string | string[])**: Text to analyze. If an array of strings is provided, it is analyzed as a multi-value field. @@ -5636,6 +5642,15 @@ client.indices.create({ index }) #### Request (object) [_request_indices.create] - **`index` (string)**: Name of the index you wish to create. +Index names must meet the following criteria: + +* Lowercase only +* Cannot include `\`, `/`, `*`, `?`, `"`, `<`, `>`, `|`, ` ` (space character), `,`, or `#` +* Indices prior to 7.0 could contain a colon (`:`), but that has been deprecated and will not be supported in later versions +* Cannot start with `-`, `_`, or `+` +* Cannot be `.` or `..` +* Cannot be longer than 255 bytes (note thtat it is bytes, so multi-byte characters will reach the limit faster) +* Names starting with `.` are deprecated, except for hidden indices and internal indices managed by plugins - **`aliases` (Optional, Record)**: Aliases for the index. - **`mappings` (Optional, { all_field, date_detection, dynamic, dynamic_date_formats, dynamic_templates, _field_names, index_field, _meta, numeric_detection, properties, _routing, _size, _source, runtime, enabled, subobjects, _data_stream_timestamp })**: Mapping for fields in the index. If specified, this mapping can include: - Field names diff --git a/src/api/types.ts b/src/api/types.ts index a3e5271b1..aed848fb1 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -2036,8 +2036,8 @@ export interface SearchRequest extends RequestBase { * * `_local` to, if possible, run the search on shards on the local node, or if not, select shards using the default method. * * `_only_nodes:,` to run the search on only the specified nodes IDs. If suitable shards exist on more than one selected node, use shards on those nodes using the default method. If none of the specified nodes are available, select shards from any available node using the default method. * * `_prefer_nodes:,` to if possible, run the search on the specified nodes IDs. If not, select shards using the default method. - * `_shards:,` to run the search only on the specified shards. You can combine this value with other `preference` values. However, the `_shards` value must come first. For example: `_shards:2,3|_local`. - * `` (any string that does not start with `_`) to route searches with the same `` to the same shards in the same order. */ + * * `_shards:,` to run the search only on the specified shards. You can combine this value with other `preference` values. However, the `_shards` value must come first. For example: `_shards:2,3|_local`. + * * `` (any string that does not start with `_`) to route searches with the same `` to the same shards in the same order. */ preference?: string /** A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. * This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method (if date filters are mandatory to match but the shard bounds and the query are disjoint). @@ -2613,7 +2613,7 @@ export interface SearchInnerHits { ignore_unmapped?: boolean script_fields?: Record seq_no_primary_term?: boolean - fields?: Fields + fields?: Field[] /** How the inner hits should be sorted per `inner_hits`. * By default, inner hits are sorted by score. */ sort?: Sort @@ -6656,6 +6656,10 @@ export interface AggregationsWeightedAvgAggregate extends AggregationsSingleMetr export type AnalysisAnalyzer = AnalysisCustomAnalyzer | AnalysisFingerprintAnalyzer | AnalysisKeywordAnalyzer | AnalysisNoriAnalyzer | AnalysisPatternAnalyzer | AnalysisSimpleAnalyzer | AnalysisStandardAnalyzer | AnalysisStopAnalyzer | AnalysisWhitespaceAnalyzer | AnalysisIcuAnalyzer | AnalysisKuromojiAnalyzer | AnalysisSnowballAnalyzer | AnalysisArabicAnalyzer | AnalysisArmenianAnalyzer | AnalysisBasqueAnalyzer | AnalysisBengaliAnalyzer | AnalysisBrazilianAnalyzer | AnalysisBulgarianAnalyzer | AnalysisCatalanAnalyzer | AnalysisChineseAnalyzer | AnalysisCjkAnalyzer | AnalysisCzechAnalyzer | AnalysisDanishAnalyzer | AnalysisDutchAnalyzer | AnalysisEnglishAnalyzer | AnalysisEstonianAnalyzer | AnalysisFinnishAnalyzer | AnalysisFrenchAnalyzer | AnalysisGalicianAnalyzer | AnalysisGermanAnalyzer | AnalysisGreekAnalyzer | AnalysisHindiAnalyzer | AnalysisHungarianAnalyzer | AnalysisIndonesianAnalyzer | AnalysisIrishAnalyzer | AnalysisItalianAnalyzer | AnalysisLatvianAnalyzer | AnalysisLithuanianAnalyzer | AnalysisNorwegianAnalyzer | AnalysisPersianAnalyzer | AnalysisPortugueseAnalyzer | AnalysisRomanianAnalyzer | AnalysisRussianAnalyzer | AnalysisSerbianAnalyzer | AnalysisSoraniAnalyzer | AnalysisSpanishAnalyzer | AnalysisSwedishAnalyzer | AnalysisTurkishAnalyzer | AnalysisThaiAnalyzer +export interface AnalysisApostropheTokenFilter extends AnalysisTokenFilterBase { + type: 'apostrophe' +} + export interface AnalysisArabicAnalyzer { type: 'arabic' stopwords?: AnalysisStopWords @@ -6663,6 +6667,10 @@ export interface AnalysisArabicAnalyzer { stem_exclusion?: string[] } +export interface AnalysisArabicNormalizationTokenFilter extends AnalysisTokenFilterBase { + type: 'arabic_normalization' +} + export interface AnalysisArmenianAnalyzer { type: 'armenian' stopwords?: AnalysisStopWords @@ -6672,6 +6680,7 @@ export interface AnalysisArmenianAnalyzer { export interface AnalysisAsciiFoldingTokenFilter extends AnalysisTokenFilterBase { type: 'asciifolding' + /** If `true`, emit both original tokens and folded tokens. Defaults to `false`. */ preserve_original?: SpecUtilsStringified } @@ -6735,6 +6744,24 @@ export interface AnalysisCjkAnalyzer { stopwords_path?: string } +export type AnalysisCjkBigramIgnoredScript = 'han' | 'hangul' | 'hiragana' | 'katakana' + +export interface AnalysisCjkBigramTokenFilter extends AnalysisTokenFilterBase { + type: 'cjk_bigram' + /** Array of character scripts for which to disable bigrams. */ + ignored_scripts?: AnalysisCjkBigramIgnoredScript[] + /** If `true`, emit tokens in both bigram and unigram form. If `false`, a CJK character is output in unigram form when it has no adjacent characters. Defaults to `false`. */ + output_unigrams?: boolean +} + +export interface AnalysisCjkWidthTokenFilter extends AnalysisTokenFilterBase { + type: 'cjk_width' +} + +export interface AnalysisClassicTokenFilter extends AnalysisTokenFilterBase { + type: 'classic' +} + export interface AnalysisClassicTokenizer extends AnalysisTokenizerBase { type: 'classic' max_token_length?: integer @@ -6742,25 +6769,45 @@ export interface AnalysisClassicTokenizer extends AnalysisTokenizerBase { export interface AnalysisCommonGramsTokenFilter extends AnalysisTokenFilterBase { type: 'common_grams' + /** A list of tokens. The filter generates bigrams for these tokens. + * Either this or the `common_words_path` parameter is required. */ common_words?: string[] + /** Path to a file containing a list of tokens. The filter generates bigrams for these tokens. + * This path must be absolute or relative to the `config` location. The file must be UTF-8 encoded. Each token in the file must be separated by a line break. + * Either this or the `common_words` parameter is required. */ common_words_path?: string + /** If `true`, matches for common words matching are case-insensitive. Defaults to `false`. */ ignore_case?: boolean + /** If `true`, the filter excludes the following tokens from the output: + * - Unigrams for common words + * - Unigrams for terms followed by common words + * Defaults to `false`. We recommend enabling this parameter for search analyzers. */ query_mode?: boolean } export interface AnalysisCompoundWordTokenFilterBase extends AnalysisTokenFilterBase { - hyphenation_patterns_path?: string + /** Maximum subword character length. Longer subword tokens are excluded from the output. Defaults to `15`. */ max_subword_size?: integer + /** Minimum subword character length. Shorter subword tokens are excluded from the output. Defaults to `2`. */ min_subword_size?: integer + /** Minimum word character length. Shorter word tokens are excluded from the output. Defaults to `5`. */ min_word_size?: integer + /** If `true`, only include the longest matching subword. Defaults to `false`. */ only_longest_match?: boolean + /** A list of subwords to look for in the token stream. If found, the subword is included in the token output. + * Either this parameter or `word_list_path` must be specified. */ word_list?: string[] + /** Path to a file that contains a list of subwords to find in the token stream. If found, the subword is included in the token output. + * This path must be absolute or relative to the config location, and the file must be UTF-8 encoded. Each token in the file must be separated by a line break. + * Either this parameter or `word_list` must be specified. */ word_list_path?: string } export interface AnalysisConditionTokenFilter extends AnalysisTokenFilterBase { type: 'condition' + /** Array of token filters. If a token matches the predicate script in the `script` parameter, these filters are applied to the token in the order provided. */ filter: string[] + /** Predicate script used to apply token filters. If a token matches this script, the filters in the `filter` parameter are applied to the token. */ script: Script | ScriptSource } @@ -6792,11 +6839,17 @@ export interface AnalysisDanishAnalyzer { stopwords_path?: string } +export interface AnalysisDecimalDigitTokenFilter extends AnalysisTokenFilterBase { + type: 'decimal_digit' +} + export type AnalysisDelimitedPayloadEncoding = 'int' | 'float' | 'identity' export interface AnalysisDelimitedPayloadTokenFilter extends AnalysisTokenFilterBase { type: 'delimited_payload' + /** Character used to separate tokens from payloads. Defaults to `|`. */ delimiter?: string + /** Data type for the stored payload. */ encoding?: AnalysisDelimitedPayloadEncoding } @@ -6815,9 +6868,13 @@ export type AnalysisEdgeNGramSide = 'front' | 'back' export interface AnalysisEdgeNGramTokenFilter extends AnalysisTokenFilterBase { type: 'edge_ngram' + /** Maximum character length of a gram. For custom token filters, defaults to `2`. For the built-in edge_ngram filter, defaults to `1`. */ max_gram?: integer + /** Minimum character length of a gram. Defaults to `1`. */ min_gram?: integer + /** Indicates whether to truncate tokens from the `front` or `back`. Defaults to `front`. */ side?: AnalysisEdgeNGramSide + /** Emits original token when set to `true`. Defaults to `false`. */ preserve_original?: SpecUtilsStringified } @@ -6831,8 +6888,16 @@ export interface AnalysisEdgeNGramTokenizer extends AnalysisTokenizerBase { export interface AnalysisElisionTokenFilter extends AnalysisTokenFilterBase { type: 'elision' + /** List of elisions to remove. + * To be removed, the elision must be at the beginning of a token and be immediately followed by an apostrophe. Both the elision and apostrophe are removed. + * For custom `elision` filters, either this parameter or `articles_path` must be specified. */ articles?: string[] + /** Path to a file that contains a list of elisions to remove. + * This path must be absolute or relative to the `config` location, and the file must be UTF-8 encoded. Each elision in the file must be separated by a line break. + * To be removed, the elision must be at the beginning of a token and be immediately followed by an apostrophe. Both the elision and apostrophe are removed. + * For custom `elision` filters, either this parameter or `articles` must be specified. */ articles_path?: string + /** If `true`, elision matching is case insensitive. If `false`, elision matching is case sensitive. Defaults to `false`. */ articles_case?: SpecUtilsStringified } @@ -6867,7 +6932,9 @@ export interface AnalysisFingerprintAnalyzer { export interface AnalysisFingerprintTokenFilter extends AnalysisTokenFilterBase { type: 'fingerprint' + /** Maximum character length, including whitespace, of the output token. Defaults to `255`. Concatenated tokens longer than this will result in no token output. */ max_output_size?: integer + /** Character to use to concatenate the token stream input. Defaults to a space. */ separator?: string } @@ -6878,6 +6945,10 @@ export interface AnalysisFinnishAnalyzer { stem_exclusion?: string[] } +export interface AnalysisFlattenGraphTokenFilter extends AnalysisTokenFilterBase { + type: 'flatten_graph' +} + export interface AnalysisFrenchAnalyzer { type: 'french' stopwords?: AnalysisStopWords @@ -6899,6 +6970,10 @@ export interface AnalysisGermanAnalyzer { stem_exclusion?: string[] } +export interface AnalysisGermanNormalizationTokenFilter extends AnalysisTokenFilterBase { + type: 'german_normalization' +} + export interface AnalysisGreekAnalyzer { type: 'greek' stopwords?: AnalysisStopWords @@ -6912,6 +6987,10 @@ export interface AnalysisHindiAnalyzer { stem_exclusion?: string[] } +export interface AnalysisHindiNormalizationTokenFilter extends AnalysisTokenFilterBase { + type: 'hindi_normalization' +} + export interface AnalysisHtmlStripCharFilter extends AnalysisCharFilterBase { type: 'html_strip' escaped_tags?: string[] @@ -6926,14 +7005,32 @@ export interface AnalysisHungarianAnalyzer { export interface AnalysisHunspellTokenFilter extends AnalysisTokenFilterBase { type: 'hunspell' + /** If `true`, duplicate tokens are removed from the filter’s output. Defaults to `true`. */ dedup?: boolean + /** One or more `.dic` files (e.g, `en_US.dic`, my_custom.dic) to use for the Hunspell dictionary. + * By default, the `hunspell` filter uses all `.dic` files in the `<$ES_PATH_CONF>/hunspell/` directory specified using the `lang`, `language`, or `locale` parameter. */ dictionary?: string + /** Locale directory used to specify the `.aff` and `.dic` files for a Hunspell dictionary. */ locale: string + /** Locale directory used to specify the `.aff` and `.dic` files for a Hunspell dictionary. + * @alias locale */ + lang: string + /** Locale directory used to specify the `.aff` and `.dic` files for a Hunspell dictionary. + * @alias locale */ + language: string + /** If `true`, only the longest stemmed version of each token is included in the output. If `false`, all stemmed versions of the token are included. Defaults to `false`. */ longest_only?: boolean } export interface AnalysisHyphenationDecompounderTokenFilter extends AnalysisCompoundWordTokenFilterBase { type: 'hyphenation_decompounder' + /** Path to an Apache FOP (Formatting Objects Processor) XML hyphenation pattern file. + * This path must be absolute or relative to the `config` location. Only FOP v1.2 compatible files are supported. */ + hyphenation_patterns_path: string + /** If `true`, do not match sub tokens in tokens that are in the word list. Defaults to `false`. */ + no_sub_matches?: boolean + /** If `true`, do not allow overlapping tokens. Defaults to `false`. */ + no_overlapping_matches?: boolean } export interface AnalysisIcuAnalyzer { @@ -6999,6 +7096,10 @@ export interface AnalysisIcuTransformTokenFilter extends AnalysisTokenFilterBase id: string } +export interface AnalysisIndicNormalizationTokenFilter extends AnalysisTokenFilterBase { + type: 'indic_normalization' +} + export interface AnalysisIndonesianAnalyzer { type: 'indonesian' stopwords?: AnalysisStopWords @@ -7020,6 +7121,11 @@ export interface AnalysisItalianAnalyzer { stem_exclusion?: string[] } +export interface AnalysisJaStopTokenFilter extends AnalysisTokenFilterBase { + type: 'ja_stop' + stopwords?: AnalysisStopWords +} + export interface AnalysisKStemTokenFilter extends AnalysisTokenFilterBase { type: 'kstem' } @@ -7028,14 +7134,22 @@ export type AnalysisKeepTypesMode = 'include' | 'exclude' export interface AnalysisKeepTypesTokenFilter extends AnalysisTokenFilterBase { type: 'keep_types' + /** Indicates whether to keep or remove the specified token types. */ mode?: AnalysisKeepTypesMode - types?: string[] + /** List of token types to keep or remove. */ + types: string[] } export interface AnalysisKeepWordsTokenFilter extends AnalysisTokenFilterBase { type: 'keep' + /** List of words to keep. Only tokens that match words in this list are included in the output. + * Either this parameter or `keep_words_path` must be specified. */ keep_words?: string[] + /** If `true`, lowercase all keep words. Defaults to `false`. */ keep_words_case?: boolean + /** Path to a file that contains a list of words to keep. Only tokens that match words in this list are included in the output. + * This path must be absolute or relative to the `config` location, and the file must be UTF-8 encoded. Each word in the file must be separated by a line break. + * Either this parameter or `keep_words` must be specified. */ keep_words_path?: string } @@ -7046,12 +7160,24 @@ export interface AnalysisKeywordAnalyzer { export interface AnalysisKeywordMarkerTokenFilter extends AnalysisTokenFilterBase { type: 'keyword_marker' + /** If `true`, matching for the `keywords` and `keywords_path` parameters ignores letter case. Defaults to `false`. */ ignore_case?: boolean + /** Array of keywords. Tokens that match these keywords are not stemmed. + * This parameter, `keywords_path`, or `keywords_pattern` must be specified. You cannot specify this parameter and `keywords_pattern`. */ keywords?: string | string[] + /** Path to a file that contains a list of keywords. Tokens that match these keywords are not stemmed. + * This path must be absolute or relative to the `config` location, and the file must be UTF-8 encoded. Each word in the file must be separated by a line break. + * This parameter, `keywords`, or `keywords_pattern` must be specified. You cannot specify this parameter and `keywords_pattern`. */ keywords_path?: string + /** Java regular expression used to match tokens. Tokens that match this expression are marked as keywords and not stemmed. + * This parameter, `keywords`, or `keywords_path` must be specified. You cannot specify this parameter and `keywords` or `keywords_pattern`. */ keywords_pattern?: string } +export interface AnalysisKeywordRepeatTokenFilter extends AnalysisTokenFilterBase { + type: 'keyword_repeat' +} + export interface AnalysisKeywordTokenizer extends AnalysisTokenizerBase { type: 'keyword' buffer_size?: integer @@ -7106,7 +7232,9 @@ export interface AnalysisLatvianAnalyzer { export interface AnalysisLengthTokenFilter extends AnalysisTokenFilterBase { type: 'length' + /** Maximum character length of a token. Longer tokens are excluded from the output. Defaults to `Integer.MAX_VALUE`, which is `2^31-1` or `2147483647`. */ max?: integer + /** Minimum character length of a token. Shorter tokens are excluded from the output. Defaults to `0`. */ min?: integer } @@ -7116,7 +7244,9 @@ export interface AnalysisLetterTokenizer extends AnalysisTokenizerBase { export interface AnalysisLimitTokenCountTokenFilter extends AnalysisTokenFilterBase { type: 'limit' + /** If `true`, the limit filter exhausts the token stream, even if the `max_token_count` has already been reached. Defaults to `false`. */ consume_all_tokens?: boolean + /** Maximum number of tokens to keep. Once this limit is reached, any remaining tokens are excluded from the output. Defaults to `1`. */ max_token_count?: SpecUtilsStringified } @@ -7133,9 +7263,12 @@ export interface AnalysisLowercaseNormalizer { export interface AnalysisLowercaseTokenFilter extends AnalysisTokenFilterBase { type: 'lowercase' - language?: string + /** Language-specific lowercase token filter to use. */ + language?: AnalysisLowercaseTokenFilterLanguages } +export type AnalysisLowercaseTokenFilterLanguages = 'greek' | 'irish' | 'turkish' + export interface AnalysisLowercaseTokenizer extends AnalysisTokenizerBase { type: 'lowercase' } @@ -7146,16 +7279,34 @@ export interface AnalysisMappingCharFilter extends AnalysisCharFilterBase { mappings_path?: string } +export interface AnalysisMinHashTokenFilter extends AnalysisTokenFilterBase { + type: 'min_hash' + /** Number of buckets to which hashes are assigned. Defaults to `512`. */ + bucket_count?: integer + /** Number of ways to hash each token in the stream. Defaults to `1`. */ + hash_count?: integer + /** Number of hashes to keep from each bucket. Defaults to `1`. + * Hashes are retained by ascending size, starting with the bucket’s smallest hash first. */ + hash_set_size?: integer + /** If `true`, the filter fills empty buckets with the value of the first non-empty bucket to its circular right if the `hash_set_size` is `1`. If the `bucket_count` argument is greater than 1, this parameter defaults to `true`. Otherwise, this parameter defaults to `false`. */ + with_rotation?: boolean +} + export interface AnalysisMultiplexerTokenFilter extends AnalysisTokenFilterBase { type: 'multiplexer' + /** A list of token filters to apply to incoming tokens. */ filters: string[] + /** If `true` (the default) then emit the original token in addition to the filtered tokens. */ preserve_original?: SpecUtilsStringified } export interface AnalysisNGramTokenFilter extends AnalysisTokenFilterBase { type: 'ngram' + /** Maximum length of characters in a gram. Defaults to `2`. */ max_gram?: integer + /** Minimum length of characters in a gram. Defaults to `1`. */ min_gram?: integer + /** Emits original token when set to `true`. Defaults to `false`. */ preserve_original?: SpecUtilsStringified } @@ -7179,6 +7330,7 @@ export type AnalysisNoriDecompoundMode = 'discard' | 'none' | 'mixed' export interface AnalysisNoriPartOfSpeechTokenFilter extends AnalysisTokenFilterBase { type: 'nori_part_of_speech' + /** An array of part-of-speech tags that should be removed. */ stoptags?: string[] } @@ -7228,7 +7380,9 @@ export interface AnalysisPatternAnalyzer { export interface AnalysisPatternCaptureTokenFilter extends AnalysisTokenFilterBase { type: 'pattern_capture' + /** A list of regular expressions to match. */ patterns: string[] + /** If set to `true` (the default) it will emit the original token. */ preserve_original?: SpecUtilsStringified } @@ -7241,9 +7395,11 @@ export interface AnalysisPatternReplaceCharFilter extends AnalysisCharFilterBase export interface AnalysisPatternReplaceTokenFilter extends AnalysisTokenFilterBase { type: 'pattern_replace' + /** If `true`, all substrings matching the pattern parameter’s regular expression are replaced. If `false`, the filter replaces only the first matching substring in each token. Defaults to `true`. */ all?: boolean - flags?: string + /** Regular expression, written in Java’s regular expression syntax. The filter replaces token substrings matching this pattern with the substring in the `replacement` parameter. */ pattern: string + /** Replacement substring. Defaults to an empty substring (`""`). */ replacement?: string } @@ -7260,6 +7416,10 @@ export interface AnalysisPersianAnalyzer { stopwords_path?: string } +export interface AnalysisPersianNormalizationTokenFilter extends AnalysisTokenFilterBase { + type: 'persian_normalization' +} + export type AnalysisPhoneticEncoder = 'metaphone' | 'double_metaphone' | 'soundex' | 'refined_soundex' | 'caverphone1' | 'caverphone2' | 'cologne' | 'nysiis' | 'koelnerphonetik' | 'haasephonetik' | 'beider_morse' | 'daitch_mokotoff' export type AnalysisPhoneticLanguage = 'any' | 'common' | 'cyrillic' | 'english' | 'french' | 'german' | 'hebrew' | 'hungarian' | 'polish' | 'romanian' | 'russian' | 'spanish' @@ -7291,6 +7451,7 @@ export interface AnalysisPortugueseAnalyzer { export interface AnalysisPredicateTokenFilter extends AnalysisTokenFilterBase { type: 'predicate_token_filter' + /** Script containing a condition used to filter incoming tokens. Only tokens that match this script are included in the output. */ script: Script | ScriptSource } @@ -7316,6 +7477,14 @@ export interface AnalysisRussianAnalyzer { stem_exclusion?: string[] } +export interface AnalysisScandinavianFoldingTokenFilter extends AnalysisTokenFilterBase { + type: 'scandinavian_folding' +} + +export interface AnalysisScandinavianNormalizationTokenFilter extends AnalysisTokenFilterBase { + type: 'scandinavian_normalization' +} + export interface AnalysisSerbianAnalyzer { type: 'serbian' stopwords?: AnalysisStopWords @@ -7323,13 +7492,23 @@ export interface AnalysisSerbianAnalyzer { stem_exclusion?: string[] } +export interface AnalysisSerbianNormalizationTokenFilter extends AnalysisTokenFilterBase { + type: 'serbian_normalization' +} + export interface AnalysisShingleTokenFilter extends AnalysisTokenFilterBase { type: 'shingle' + /** String used in shingles as a replacement for empty positions that do not contain a token. This filler token is only used in shingles, not original unigrams. Defaults to an underscore (`_`). */ filler_token?: string - max_shingle_size?: integer | string - min_shingle_size?: integer | string + /** Maximum number of tokens to concatenate when creating shingles. Defaults to `2`. */ + max_shingle_size?: SpecUtilsStringified + /** Minimum number of tokens to concatenate when creating shingles. Defaults to `2`. */ + min_shingle_size?: SpecUtilsStringified + /** If `true`, the output includes the original input tokens. If `false`, the output only includes shingles; the original input tokens are removed. Defaults to `true`. */ output_unigrams?: boolean + /** If `true`, the output includes the original input tokens only if no shingles are produced; if shingles are produced, the output only includes shingles. Defaults to `false`. */ output_unigrams_if_no_shingles?: boolean + /** Separator used to concatenate adjacent tokens to form a shingle. Defaults to a space (`" "`). */ token_separator?: string } @@ -7355,10 +7534,11 @@ export interface AnalysisSnowballAnalyzer { stopwords?: AnalysisStopWords } -export type AnalysisSnowballLanguage = 'Armenian' | 'Basque' | 'Catalan' | 'Danish' | 'Dutch' | 'English' | 'Finnish' | 'French' | 'German' | 'German2' | 'Hungarian' | 'Italian' | 'Kp' | 'Lovins' | 'Norwegian' | 'Porter' | 'Portuguese' | 'Romanian' | 'Russian' | 'Spanish' | 'Swedish' | 'Turkish' +export type AnalysisSnowballLanguage = 'Arabic' | 'Armenian' | 'Basque' | 'Catalan' | 'Danish' | 'Dutch' | 'English' | 'Estonian' | 'Finnish' | 'French' | 'German' | 'German2' | 'Hungarian' | 'Italian' | 'Irish' | 'Kp' | 'Lithuanian' | 'Lovins' | 'Norwegian' | 'Porter' | 'Portuguese' | 'Romanian' | 'Russian' | 'Serbian' | 'Spanish' | 'Swedish' | 'Turkish' export interface AnalysisSnowballTokenFilter extends AnalysisTokenFilterBase { type: 'snowball' + /** Controls the language used by the stemmer. */ language?: AnalysisSnowballLanguage } @@ -7369,6 +7549,10 @@ export interface AnalysisSoraniAnalyzer { stem_exclusion?: string[] } +export interface AnalysisSoraniNormalizationTokenFilter extends AnalysisTokenFilterBase { + type: 'sorani_normalization' +} + export interface AnalysisSpanishAnalyzer { type: 'spanish' stopwords?: AnalysisStopWords @@ -7395,7 +7579,9 @@ export interface AnalysisStandardTokenizer extends AnalysisTokenizerBase { export interface AnalysisStemmerOverrideTokenFilter extends AnalysisTokenFilterBase { type: 'stemmer_override' + /** A list of mapping rules to use. */ rules?: string[] + /** A path (either relative to `config` location, or absolute) to a list of mappings. */ rules_path?: string } @@ -7418,13 +7604,20 @@ export interface AnalysisStopAnalyzer { export interface AnalysisStopTokenFilter extends AnalysisTokenFilterBase { type: 'stop' + /** If `true`, stop word matching is case insensitive. For example, if `true`, a stop word of the matches and removes `The`, `THE`, or `the`. Defaults to `false`. */ ignore_case?: boolean + /** If `true`, the last token of a stream is removed if it’s a stop word. Defaults to `true`. */ remove_trailing?: boolean + /** Language value, such as `_arabic_` or `_thai_`. Defaults to `_english_`. */ stopwords?: AnalysisStopWords + /** Path to a file that contains a list of stop words to remove. + * This path must be absolute or relative to the `config` location, and the file must be UTF-8 encoded. Each stop word in the file must be separated by a line break. */ stopwords_path?: string } -export type AnalysisStopWords = string | string[] +export type AnalysisStopWordLanguage = '_arabic_' | '_armenian_' | '_basque_' | '_bengali_' | '_brazilian_' | '_bulgarian_' | '_catalan_' | '_cjk_' | '_czech_' | '_danish_' | '_dutch_' | '_english_' | '_estonian_' | '_finnish_' | '_french_' | '_galician_' | '_german_' | '_greek_' | '_hindi_' | '_hungarian_' | '_indonesian_' | '_irish_' | '_italian_' | '_latvian_' | '_lithuanian_' | '_norwegian_' | '_persian_' | '_portuguese_' | '_romanian_' | '_russian_' | '_serbian_' | '_sorani_' | '_spanish_' | '_swedish_' | '_thai_' | '_turkish_' | '_none_' + +export type AnalysisStopWords = AnalysisStopWordLanguage | string[] export interface AnalysisSwedishAnalyzer { type: 'swedish' @@ -7435,27 +7628,30 @@ export interface AnalysisSwedishAnalyzer { export type AnalysisSynonymFormat = 'solr' | 'wordnet' -export interface AnalysisSynonymGraphTokenFilter extends AnalysisTokenFilterBase { +export interface AnalysisSynonymGraphTokenFilter extends AnalysisSynonymTokenFilterBase { type: 'synonym_graph' - expand?: boolean - format?: AnalysisSynonymFormat - lenient?: boolean - synonyms?: string[] - synonyms_path?: string - synonyms_set?: string - tokenizer?: string - updateable?: boolean } -export interface AnalysisSynonymTokenFilter extends AnalysisTokenFilterBase { +export interface AnalysisSynonymTokenFilter extends AnalysisSynonymTokenFilterBase { type: 'synonym' +} + +export interface AnalysisSynonymTokenFilterBase extends AnalysisTokenFilterBase { + /** Expands definitions for equivalent synonym rules. Defaults to `true`. */ expand?: boolean + /** Sets the synonym rules format. */ format?: AnalysisSynonymFormat + /** If `true` ignores errors while parsing the synonym rules. It is important to note that only those synonym rules which cannot get parsed are ignored. Defaults to the value of the `updateable` setting. */ lenient?: boolean + /** Used to define inline synonyms. */ synonyms?: string[] + /** Used to provide a synonym file. This path must be absolute or relative to the `config` location. */ synonyms_path?: string + /** Provide a synonym set created via Synonyms Management APIs. */ synonyms_set?: string + /** Controls the tokenizers that will be used to tokenize the synonym, this parameter is for backwards compatibility for indices that created before 6.0. */ tokenizer?: string + /** If `true` allows reloading search analyzers to pick up changes to synonym files. Only to be used for search analyzers. Defaults to `false`. */ updateable?: boolean } @@ -7477,7 +7673,7 @@ export interface AnalysisTokenFilterBase { version?: VersionString } -export type AnalysisTokenFilterDefinition = AnalysisAsciiFoldingTokenFilter | AnalysisCommonGramsTokenFilter | AnalysisConditionTokenFilter | AnalysisDelimitedPayloadTokenFilter | AnalysisEdgeNGramTokenFilter | AnalysisElisionTokenFilter | AnalysisFingerprintTokenFilter | AnalysisHunspellTokenFilter | AnalysisHyphenationDecompounderTokenFilter | AnalysisKeepTypesTokenFilter | AnalysisKeepWordsTokenFilter | AnalysisKeywordMarkerTokenFilter | AnalysisKStemTokenFilter | AnalysisLengthTokenFilter | AnalysisLimitTokenCountTokenFilter | AnalysisLowercaseTokenFilter | AnalysisMultiplexerTokenFilter | AnalysisNGramTokenFilter | AnalysisNoriPartOfSpeechTokenFilter | AnalysisPatternCaptureTokenFilter | AnalysisPatternReplaceTokenFilter | AnalysisPorterStemTokenFilter | AnalysisPredicateTokenFilter | AnalysisRemoveDuplicatesTokenFilter | AnalysisReverseTokenFilter | AnalysisShingleTokenFilter | AnalysisSnowballTokenFilter | AnalysisStemmerOverrideTokenFilter | AnalysisStemmerTokenFilter | AnalysisStopTokenFilter | AnalysisSynonymGraphTokenFilter | AnalysisSynonymTokenFilter | AnalysisTrimTokenFilter | AnalysisTruncateTokenFilter | AnalysisUniqueTokenFilter | AnalysisUppercaseTokenFilter | AnalysisWordDelimiterGraphTokenFilter | AnalysisWordDelimiterTokenFilter | AnalysisKuromojiStemmerTokenFilter | AnalysisKuromojiReadingFormTokenFilter | AnalysisKuromojiPartOfSpeechTokenFilter | AnalysisIcuCollationTokenFilter | AnalysisIcuFoldingTokenFilter | AnalysisIcuNormalizationTokenFilter | AnalysisIcuTransformTokenFilter | AnalysisPhoneticTokenFilter | AnalysisDictionaryDecompounderTokenFilter +export type AnalysisTokenFilterDefinition = AnalysisApostropheTokenFilter | AnalysisArabicNormalizationTokenFilter | AnalysisAsciiFoldingTokenFilter | AnalysisCjkBigramTokenFilter | AnalysisCjkWidthTokenFilter | AnalysisClassicTokenFilter | AnalysisCommonGramsTokenFilter | AnalysisConditionTokenFilter | AnalysisDecimalDigitTokenFilter | AnalysisDelimitedPayloadTokenFilter | AnalysisEdgeNGramTokenFilter | AnalysisElisionTokenFilter | AnalysisFingerprintTokenFilter | AnalysisFlattenGraphTokenFilter | AnalysisGermanNormalizationTokenFilter | AnalysisHindiNormalizationTokenFilter | AnalysisHunspellTokenFilter | AnalysisHyphenationDecompounderTokenFilter | AnalysisIndicNormalizationTokenFilter | AnalysisKeepTypesTokenFilter | AnalysisKeepWordsTokenFilter | AnalysisKeywordMarkerTokenFilter | AnalysisKeywordRepeatTokenFilter | AnalysisKStemTokenFilter | AnalysisLengthTokenFilter | AnalysisLimitTokenCountTokenFilter | AnalysisLowercaseTokenFilter | AnalysisMinHashTokenFilter | AnalysisMultiplexerTokenFilter | AnalysisNGramTokenFilter | AnalysisNoriPartOfSpeechTokenFilter | AnalysisPatternCaptureTokenFilter | AnalysisPatternReplaceTokenFilter | AnalysisPersianNormalizationTokenFilter | AnalysisPorterStemTokenFilter | AnalysisPredicateTokenFilter | AnalysisRemoveDuplicatesTokenFilter | AnalysisReverseTokenFilter | AnalysisScandinavianFoldingTokenFilter | AnalysisScandinavianNormalizationTokenFilter | AnalysisSerbianNormalizationTokenFilter | AnalysisShingleTokenFilter | AnalysisSnowballTokenFilter | AnalysisSoraniNormalizationTokenFilter | AnalysisStemmerOverrideTokenFilter | AnalysisStemmerTokenFilter | AnalysisStopTokenFilter | AnalysisSynonymGraphTokenFilter | AnalysisSynonymTokenFilter | AnalysisTrimTokenFilter | AnalysisTruncateTokenFilter | AnalysisUniqueTokenFilter | AnalysisUppercaseTokenFilter | AnalysisWordDelimiterGraphTokenFilter | AnalysisWordDelimiterTokenFilter | AnalysisJaStopTokenFilter | AnalysisKuromojiStemmerTokenFilter | AnalysisKuromojiReadingFormTokenFilter | AnalysisKuromojiPartOfSpeechTokenFilter | AnalysisIcuCollationTokenFilter | AnalysisIcuFoldingTokenFilter | AnalysisIcuNormalizationTokenFilter | AnalysisIcuTransformTokenFilter | AnalysisPhoneticTokenFilter | AnalysisDictionaryDecompounderTokenFilter export type AnalysisTokenizer = string | AnalysisTokenizerDefinition @@ -7493,6 +7689,7 @@ export interface AnalysisTrimTokenFilter extends AnalysisTokenFilterBase { export interface AnalysisTruncateTokenFilter extends AnalysisTokenFilterBase { type: 'truncate' + /** Character limit for each token. Tokens exceeding this limit are truncated. Defaults to `10`. */ length?: integer } @@ -7510,6 +7707,7 @@ export interface AnalysisUaxEmailUrlTokenizer extends AnalysisTokenizerBase { export interface AnalysisUniqueTokenFilter extends AnalysisTokenFilterBase { type: 'unique' + /** If `true`, only remove duplicate tokens in the same position. Defaults to `false`. */ only_on_same_position?: boolean } @@ -7527,39 +7725,45 @@ export interface AnalysisWhitespaceTokenizer extends AnalysisTokenizerBase { max_token_length?: integer } -export interface AnalysisWordDelimiterGraphTokenFilter extends AnalysisTokenFilterBase { +export interface AnalysisWordDelimiterGraphTokenFilter extends AnalysisWordDelimiterTokenFilterBase { type: 'word_delimiter_graph' + /** If `true`, the filter adjusts the offsets of split or catenated tokens to better reflect their actual position in the token stream. Defaults to `true`. */ adjust_offsets?: boolean - catenate_all?: boolean - catenate_numbers?: boolean - catenate_words?: boolean - generate_number_parts?: boolean - generate_word_parts?: boolean + /** If `true`, the filter skips tokens with a keyword attribute of true. Defaults to `false`. */ ignore_keywords?: boolean - preserve_original?: SpecUtilsStringified - protected_words?: string[] - protected_words_path?: string - split_on_case_change?: boolean - split_on_numerics?: boolean - stem_english_possessive?: boolean - type_table?: string[] - type_table_path?: string } -export interface AnalysisWordDelimiterTokenFilter extends AnalysisTokenFilterBase { +export interface AnalysisWordDelimiterTokenFilter extends AnalysisWordDelimiterTokenFilterBase { type: 'word_delimiter' +} + +export interface AnalysisWordDelimiterTokenFilterBase extends AnalysisTokenFilterBase { + /** If `true`, the filter produces catenated tokens for chains of alphanumeric characters separated by non-alphabetic delimiters. Defaults to `false`. */ catenate_all?: boolean + /** If `true`, the filter produces catenated tokens for chains of numeric characters separated by non-alphabetic delimiters. Defaults to `false`. */ catenate_numbers?: boolean + /** If `true`, the filter produces catenated tokens for chains of alphabetical characters separated by non-alphabetic delimiters. Defaults to `false`. */ catenate_words?: boolean + /** If `true`, the filter includes tokens consisting of only numeric characters in the output. If `false`, the filter excludes these tokens from the output. Defaults to `true`. */ generate_number_parts?: boolean + /** If `true`, the filter includes tokens consisting of only alphabetical characters in the output. If `false`, the filter excludes these tokens from the output. Defaults to `true`. */ generate_word_parts?: boolean + /** If `true`, the filter includes the original version of any split tokens in the output. This original version includes non-alphanumeric delimiters. Defaults to `false`. */ preserve_original?: SpecUtilsStringified + /** Array of tokens the filter won’t split. */ protected_words?: string[] + /** Path to a file that contains a list of tokens the filter won’t split. + * This path must be absolute or relative to the `config` location, and the file must be UTF-8 encoded. Each token in the file must be separated by a line break. */ protected_words_path?: string + /** If `true`, the filter splits tokens at letter case transitions. For example: camelCase -> [ camel, Case ]. Defaults to `true`. */ split_on_case_change?: boolean + /** If `true`, the filter splits tokens at letter-number transitions. For example: j2se -> [ j, 2, se ]. Defaults to `true`. */ split_on_numerics?: boolean + /** If `true`, the filter removes the English possessive (`'s`) from the end of each token. For example: O'Neil's -> [ O, Neil ]. Defaults to `true`. */ stem_english_possessive?: boolean + /** Array of custom type mappings for characters. This allows you to map non-alphanumeric characters as numeric or alphanumeric to avoid splitting on those characters. */ type_table?: string[] + /** Path to a file that contains custom type mappings for characters. This allows you to map non-alphanumeric characters as numeric or alphanumeric to avoid splitting on those characters. */ type_table_path?: string } @@ -15857,6 +16061,62 @@ export interface ClusterStateRequest extends RequestBase { export type ClusterStateResponse = any +export interface ClusterStatsCCSStats { + /** Contains remote cluster settings and metrics collected from them. + * The keys are cluster names, and the values are per-cluster data. + * Only present if `include_remotes` option is set to true. */ + clusters?: Record + /** Information about cross-cluster search usage. */ + _search: ClusterStatsCCSUsageStats + /** Information about ES|QL cross-cluster query usage. */ + _esql?: ClusterStatsCCSUsageStats +} + +export interface ClusterStatsCCSUsageClusterStats { + /** The total number of successful (not skipped) cross-cluster search requests that were executed against this cluster. This may include requests where partial results were returned, but not requests in which the cluster has been skipped entirely. */ + total: integer + /** The total number of cross-cluster search requests for which this cluster was skipped. */ + skipped: integer + /** Statistics about the time taken to execute requests against this cluster. */ + took: ClusterStatsCCSUsageTimeValue +} + +export interface ClusterStatsCCSUsageStats { + /** The total number of cross-cluster search requests that have been executed by the cluster. */ + total: integer + /** The total number of cross-cluster search requests that have been successfully executed by the cluster. */ + success: integer + /** The total number of cross-cluster search requests (successful or failed) that had at least one remote cluster skipped. */ + skipped: integer + /** Statistics about the time taken to execute cross-cluster search requests. */ + took: ClusterStatsCCSUsageTimeValue + /** Statistics about the time taken to execute cross-cluster search requests for which the `ccs_minimize_roundtrips` setting was set to `true`. */ + took_mrt_true?: ClusterStatsCCSUsageTimeValue + /** Statistics about the time taken to execute cross-cluster search requests for which the `ccs_minimize_roundtrips` setting was set to `false`. */ + took_mrt_false?: ClusterStatsCCSUsageTimeValue + /** The maximum number of remote clusters that were queried in a single cross-cluster search request. */ + remotes_per_search_max: integer + /** The average number of remote clusters that were queried in a single cross-cluster search request. */ + remotes_per_search_avg: double + /** Statistics about the reasons for cross-cluster search request failures. The keys are the failure reason names and the values are the number of requests that failed for that reason. */ + failure_reasons: Record + /** The keys are the names of the search feature, and the values are the number of requests that used that feature. Single request can use more than one feature (e.g. both `async` and `wildcard`). */ + features: Record + /** Statistics about the clients that executed cross-cluster search requests. The keys are the names of the clients, and the values are the number of requests that were executed by that client. Only known clients (such as `kibana` or `elasticsearch`) are counted. */ + clients: Record + /** Statistics about the clusters that were queried in cross-cluster search requests. The keys are cluster names, and the values are per-cluster telemetry data. This also includes the local cluster itself, which uses the name `(local)`. */ + clusters: Record +} + +export interface ClusterStatsCCSUsageTimeValue { + /** The maximum time taken to execute a request, in milliseconds. */ + max: DurationValue + /** The average time taken to execute a request, in milliseconds. */ + avg: DurationValue + /** The 90th percentile of the time taken to execute requests, in milliseconds. */ + p90: DurationValue +} + export interface ClusterStatsCharFilterTypes { /** Contains statistics about analyzer types used in selected nodes. */ analyzer_types: ClusterStatsFieldTypes[] @@ -16187,6 +16447,39 @@ export interface ClusterStatsOperatingSystemMemoryInfo { used_percent: integer } +export interface ClusterStatsRemoteClusterInfo { + /** The UUID of the remote cluster. */ + cluster_uuid: string + /** The connection mode used to communicate with the remote cluster. */ + mode: string + /** The `skip_unavailable` setting used for this remote cluster. */ + skip_unavailable: boolean + /** Transport compression setting used for this remote cluster. */ + transport_compress: string + /** Health status of the cluster, based on the state of its primary and replica shards. */ + status: HealthStatus + /** The list of Elasticsearch versions used by the nodes on the remote cluster. */ + version: VersionString[] + /** The total count of nodes in the remote cluster. */ + nodes_count: integer + /** The total number of shards in the remote cluster. */ + shards_count: integer + /** The total number of indices in the remote cluster. */ + indices_count: integer + /** Total data set size, in bytes, of all shards assigned to selected nodes. */ + indices_total_size_in_bytes: long + /** Total data set size of all shards assigned to selected nodes, as a human-readable string. */ + indices_total_size?: string + /** Maximum amount of memory, in bytes, available for use by the heap across the nodes of the remote cluster. */ + max_heap_in_bytes: long + /** Maximum amount of memory available for use by the heap across the nodes of the remote cluster, as a human-readable string. */ + max_heap?: string + /** Total amount, in bytes, of physical memory across the nodes of the remote cluster. */ + mem_total_in_bytes: long + /** Total amount of physical memory across the nodes of the remote cluster, as a human-readable string. */ + mem_total?: string +} + export interface ClusterStatsRequest extends RequestBase { /** Comma-separated list of node filters used to limit returned information. Defaults to all nodes in the cluster. */ node_id?: NodeIds @@ -16248,6 +16541,8 @@ export interface ClusterStatsStatsResponseBase extends NodesNodesResponseBase { status: HealthStatus /** Unix timestamp, in milliseconds, for the last time the cluster statistics were refreshed. */ timestamp: long + /** Cross-cluster stats */ + ccs: ClusterStatsCCSStats } export interface ConnectorConnector { @@ -17366,7 +17661,10 @@ export type EsqlTableValuesLongDouble = double | double[] export type EsqlTableValuesLongValue = long | long[] export interface EsqlAsyncQueryRequest extends RequestBase { - /** If `true`, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards. */ + /** If `true`, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards. + * If `false`, the query will fail if there are any failures. + * + * To override the default behavior, you can set the `esql.query.allow_partial_results` cluster setting to `false`. */ allow_partial_results?: boolean /** The character to use between values within a CSV row. * It is valid only for the CSV format. */ @@ -17517,7 +17815,10 @@ export interface EsqlQueryRequest extends RequestBase { /** Should columns that are entirely `null` be removed from the `columns` and `values` portion of the results? * Defaults to `false`. If `true` then the response will include an extra section under the name `all_columns` which has the name of all columns. */ drop_null_columns?: boolean - /** If `true`, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards. */ + /** If `true`, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards. + * If `false`, the query will fail if there are any failures. + * + * To override the default behavior, you can set the `esql.query.allow_partial_results` cluster setting to `false`. */ allow_partial_results?: boolean /** By default, ES|QL returns results as rows. For example, FROM returns each individual document as one row. For the JSON, YAML, CBOR and smile formats, ES|QL can return the results in a columnar fashion where one row represents all the values of a certain column in the results. */ columnar?: boolean @@ -18025,7 +18326,7 @@ export interface IlmExplainLifecycleLifecycleExplainManaged { lifecycle_date?: DateTime lifecycle_date_millis?: EpochTime managed: true - phase: Name + phase?: Name phase_time?: DateTime phase_time_millis?: EpochTime policy?: Name @@ -19150,7 +19451,16 @@ export interface IndicesCloseResponse { } export interface IndicesCreateRequest extends RequestBase { - /** Name of the index you wish to create. */ + /** Name of the index you wish to create. + * Index names must meet the following criteria: + * + * * Lowercase only + * * Cannot include `\`, `/`, `*`, `?`, `"`, `<`, `>`, `|`, ` ` (space character), `,`, or `#` + * * Indices prior to 7.0 could contain a colon (`:`), but that has been deprecated and will not be supported in later versions + * * Cannot start with `-`, `_`, or `+` + * * Cannot be `.` or `..` + * * Cannot be longer than 255 bytes (note thtat it is bytes, so multi-byte characters will reach the limit faster) + * * Names starting with `.` are deprecated, except for hidden indices and internal indices managed by plugins */ index: IndexName /** Period to wait for a connection to the master node. * If no response is received before the timeout expires, the request fails and returns an error. */ @@ -23278,16 +23588,18 @@ export interface IngestPipelineProcessor extends IngestProcessorBase { ignore_missing_pipeline?: boolean } -export interface IngestPipelineSimulation { +export interface IngestPipelineProcessorResult { doc?: IngestDocumentSimulation tag?: string processor_type?: string - status?: WatcherActionStatusOptions + status?: IngestPipelineSimulationStatusOptions description?: string ignored_error?: ErrorCause error?: ErrorCause } +export type IngestPipelineSimulationStatusOptions = 'success' | 'error' | 'error_ignored' | 'skipped' | 'dropped' + export interface IngestProcessorBase { /** Description of the processor. * Useful for describing the purpose of the processor or its configuration. */ @@ -23566,7 +23878,7 @@ export type IngestShapeType = 'geo_shape' | 'shape' export interface IngestSimulateDocumentResult { doc?: IngestDocumentSimulation error?: ErrorCause - processor_results?: IngestPipelineSimulation[] + processor_results?: IngestPipelineProcessorResult[] } export interface IngestSortProcessor extends IngestProcessorBase {