Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AUTOCUT] Update opensearch-js to reflect the latest OpenSearch API spec (2024-11-24) #927

Merged
merged 1 commit into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/_core/explain.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export type Explain_Response = ApiResponse & {
export type Explain_ResponseBody = {
_id: Common.Id;
_index: Common.IndexName;
_type?: Common.Type;
explanation?: Core_Explain.ExplanationDetail;
get?: Common.InlineGet;
matched: boolean;
Expand Down
2 changes: 1 addition & 1 deletion api/_core/msearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
* @param {number} [params.max_concurrent_searches] - Maximum number of concurrent searches the multi search API can execute.
* @param {number} [params.max_concurrent_shard_requests=5] - Maximum number of concurrent shard requests that each sub-search request executes per node.
* @param {number} [params.pre_filter_shard_size] - Defines 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 i.e., if date filters are mandatory to match but the shard bounds and the query are disjoint.
* @param {boolean} [params.rest_total_hits_as_int=false] - If `true`, hits.total are returned as an integer in the response. Defaults to false, which returns an object.
* @param {boolean} [params.rest_total_hits_as_int=false] - If `true`, `hits.total` are returned as an integer in the response. Defaults to false, which returns an object.
* @param {string} [params.search_type] - Indicates whether global term and document frequencies should be used when scoring returned documents.
* @param {boolean} [params.typed_keys] - Specifies whether aggregation and suggester names should be prefixed by their respective types in the response.
* @param {string} [params.index] - Comma-separated list of data streams, indexes, and index aliases to search.
Expand Down
2 changes: 1 addition & 1 deletion api/_core/searchTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
* @param {boolean} [params.ignore_unavailable] - If `false`, the request returns an error if it targets a missing or closed index.
* @param {string} [params.preference=random] - Specifies the node or shard the operation should be performed on. Random by default.
* @param {boolean} [params.profile] - If `true`, the query execution is profiled.
* @param {boolean} [params.rest_total_hits_as_int=false] - If `true`, hits.total are rendered as an integer in the response.
* @param {boolean} [params.rest_total_hits_as_int=false] - If `true`, `hits.total` are rendered as an integer in the response.
* @param {string} [params.routing] - Custom value used to route operations to a specific shard.
* @param {string} [params.scroll] - Specifies how long a consistent view of the index should be maintained for scrolled search.
* @param {string} [params.search_type] - The type of the search operation.
Expand Down
24 changes: 12 additions & 12 deletions api/_types/_common.analysis.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import * as Common from './_common'
export type Analyzer = CustomAnalyzer | FingerprintAnalyzer | KeywordAnalyzer | LanguageAnalyzer | NoriAnalyzer | PatternAnalyzer | SimpleAnalyzer | StandardAnalyzer | StopAnalyzer | WhitespaceAnalyzer | IcuAnalyzer | KuromojiAnalyzer | SnowballAnalyzer | DutchAnalyzer | SmartcnAnalyzer | CjkAnalyzer | PhoneAnalyzer

export type AsciiFoldingTokenFilter = TokenFilterBase & {
preserve_original?: Common.Stringifiedboolean;
preserve_original?: Common.StringifiedBoolean;
type: 'asciifolding';
}

Expand Down Expand Up @@ -104,7 +104,7 @@ export type EdgeNGramSide = 'back' | 'front'
export type EdgeNGramTokenFilter = TokenFilterBase & {
max_gram?: number;
min_gram?: number;
preserve_original?: Common.Stringifiedboolean;
preserve_original?: Common.StringifiedBoolean;
side?: EdgeNGramSide;
type: 'edge_ngram';
}
Expand All @@ -119,7 +119,7 @@ export type EdgeNGramTokenizer = TokenizerBase & {

export type ElisionTokenFilter = TokenFilterBase & {
articles?: string[];
articles_case?: Common.Stringifiedboolean;
articles_case?: Common.StringifiedBoolean;
articles_path?: string;
type: 'elision';
}
Expand Down Expand Up @@ -319,7 +319,7 @@ export type LetterTokenizer = TokenizerBase & {

export type LimitTokenCountTokenFilter = TokenFilterBase & {
consume_all_tokens?: boolean;
max_token_count?: Common.Stringifiedinteger;
max_token_count?: Common.StringifiedInteger;
type: 'limit';
}

Expand All @@ -344,14 +344,14 @@ export type MappingCharFilter = CharFilterBase & {

export type MultiplexerTokenFilter = TokenFilterBase & {
filters: string[];
preserve_original?: Common.Stringifiedboolean;
preserve_original?: Common.StringifiedBoolean;
type: 'multiplexer';
}

export type NGramTokenFilter = TokenFilterBase & {
max_gram?: number;
min_gram?: number;
preserve_original?: Common.Stringifiedboolean;
preserve_original?: Common.StringifiedBoolean;
type: 'ngram';
}

Expand Down Expand Up @@ -389,11 +389,11 @@ export type NoriTokenizer = TokenizerBase & {
export type Normalizer = LowercaseNormalizer | CustomNormalizer

export type PathHierarchyTokenizer = TokenizerBase & {
buffer_size: Common.Stringifiedinteger;
buffer_size: Common.StringifiedInteger;
delimiter: string;
replacement?: string;
reverse: Common.Stringifiedboolean;
skip: Common.Stringifiedinteger;
reverse: Common.StringifiedBoolean;
skip: Common.StringifiedInteger;
type: 'path_hierarchy';
}

Expand All @@ -408,7 +408,7 @@ export type PatternAnalyzer = {

export type PatternCaptureTokenFilter = TokenFilterBase & {
patterns: string[];
preserve_original?: Common.Stringifiedboolean;
preserve_original?: Common.StringifiedBoolean;
type: 'pattern_capture';
}

Expand Down Expand Up @@ -641,7 +641,7 @@ export type WordDelimiterGraphTokenFilter = TokenFilterBase & {
generate_number_parts?: boolean;
generate_word_parts?: boolean;
ignore_keywords?: boolean;
preserve_original?: Common.Stringifiedboolean;
preserve_original?: Common.StringifiedBoolean;
protected_words?: string[];
protected_words_path?: string;
split_on_case_change?: boolean;
Expand All @@ -658,7 +658,7 @@ export type WordDelimiterTokenFilter = TokenFilterBase & {
catenate_words?: boolean;
generate_number_parts?: boolean;
generate_word_parts?: boolean;
preserve_original?: Common.Stringifiedboolean;
preserve_original?: Common.StringifiedBoolean;
protected_words?: string[];
protected_words_path?: string;
split_on_case_change?: boolean;
Expand Down
8 changes: 6 additions & 2 deletions api/_types/_common.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -804,13 +804,17 @@ export type StoreStats = {
size_in_bytes: ByteCount;
}

export type Stringifiedboolean = boolean | string
export type StringifiedBoolean = boolean | string

export type StringifiedDouble = number | string

export type StringifiedEpochTimeUnitMillis = EpochTimeUnitMillis | string

export type StringifiedEpochTimeUnitSeconds = EpochTimeUnitSeconds | string

export type Stringifiedinteger = number | string
export type StringifiedInteger = number | string

export type StringifiedLong = number | string

export type StringifiedVersionNumber = VersionNumber | string

Expand Down
Loading
Loading