Skip to content

Commit

Permalink
Updated opensearch-js to reflect the latest OpenSearch API spec (2024…
Browse files Browse the repository at this point in the history
…-11-17)

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
nhtruong authored and github-actions[bot] committed Nov 17, 2024
1 parent c2f50f3 commit a1bae0b
Show file tree
Hide file tree
Showing 75 changed files with 256 additions and 232 deletions.
2 changes: 1 addition & 1 deletion api/_core/clearScroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const { normalizeArguments, parsePathParam } = require('../utils');
*
* @param {object} [params]
* @param {string} [params.scroll_id] DEPRECATED - Comma-separated list of scroll IDs to clear. To clear all scroll IDs, use `_all`.
* @param {object} [params.body] - Comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter
* @param {object} [params.body] - Comma-separated list of scroll IDs to clear if none was specified using the `scroll_id` parameter
*
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
* @param {function} [callback] - Callback that handles errors and response
Expand Down
6 changes: 3 additions & 3 deletions api/_core/count.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@ const { normalizeArguments, parsePathParam } = require('../utils');
* @memberOf API-Core
*
* @param {object} [params]
* @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices.
* @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes.
* @param {boolean} [params.analyze_wildcard=false] - If `true`, wildcard and prefix queries are analyzed. This parameter can only be used when the `q` query string parameter is specified.
* @param {string} [params.analyzer] - Analyzer to use for the query string. This parameter can only be used when the `q` query string parameter is specified.
* @param {string} [params.default_operator] - The default operator for query string query: `AND` or `OR`. This parameter can only be used when the `q` query string parameter is specified.
* @param {string} [params.df] - Field to use as default where no field prefix is given in the query string. This parameter can only be used when the `q` query string parameter is specified.
* @param {string} [params.expand_wildcards] - Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`.
* @param {boolean} [params.ignore_throttled] - If `true`, concrete, expanded or aliased indices are ignored when frozen.
* @param {boolean} [params.ignore_throttled] - If `true`, concrete, expanded or aliased indexes are ignored when frozen.
* @param {boolean} [params.ignore_unavailable] - If `false`, the request returns an error if it targets a missing or closed index.
* @param {boolean} [params.lenient] - If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.
* @param {number} [params.min_score] - Sets the minimum `_score` value that documents must have to be included in the result.
* @param {string} [params.preference=random] - Specifies the node or shard the operation should be performed on. Random by default.
* @param {string} [params.q] - Query in the Lucene query string syntax.
* @param {string} [params.routing] - Custom value used to route operations to a specific shard.
* @param {number} [params.terminate_after] - Maximum number of documents to collect for each shard. If a query reaches this limit, OpenSearch terminates the query early. OpenSearch collects documents before sorting.
* @param {string} [params.index] - Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (`*`). To search all data streams and indices, omit this parameter or use `*` or `_all`.
* @param {string} [params.index] - Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams and indexes, omit this parameter or use `*` or `_all`.
* @param {object} [params.body] - Query to restrict the results specified with the Query DSL (optional)
*
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
Expand Down
4 changes: 2 additions & 2 deletions api/_core/createPit.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
*
* @param {object} params
* @param {boolean} [params.allow_partial_pit_creation] - Allow if point in time can be created with partial failures.
* @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indexes that are open, closed or both.
* @param {string} [params.keep_alive] - Specify the keep alive for point in time.
* @param {string} [params.preference=random] - Specify the node or shard the operation should be performed on.
* @param {string} [params.routing] - Comma-separated list of specific routing values.
* @param {array} params.index - Comma-separated list of indices; use `_all` or empty string to perform the operation on all indices.
* @param {array} params.index - Comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes.
*
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
* @param {function} [callback] - Callback that handles errors and response
Expand Down
6 changes: 3 additions & 3 deletions api/_core/deleteByQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
* @param {array} [params._source] - True or false to return the _source field or not, or a list of fields to return.
* @param {array} [params._source_excludes] - List of fields to exclude from the returned _source field.
* @param {array} [params._source_includes] - List of fields to extract and return from the _source field.
* @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.
* @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.
* @param {boolean} [params.analyze_wildcard=false] - If `true`, wildcard and prefix queries are analyzed.
* @param {string} [params.analyzer] - Analyzer to use for the query string.
* @param {string} [params.conflicts] - What to do if delete by query hits version conflicts: `abort` or `proceed`.
Expand All @@ -53,12 +53,12 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
* @param {string} [params.slices] - The number of slices this task should be divided into.
* @param {array} [params.sort] - A comma-separated list of <field>:<direction> pairs.
* @param {array} [params.stats] - Specific `tag` of the request for logging and statistical purposes.
* @param {number} [params.terminate_after] - Maximum number of documents to collect for each shard. If a query reaches this limit, OpenSearch terminates the query early. OpenSearch collects documents before sorting. Use with caution. OpenSearch applies this parameter to each shard handling the request. When possible, let OpenSearch perform early termination automatically. Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.
* @param {number} [params.terminate_after] - Maximum number of documents to collect for each shard. If a query reaches this limit, OpenSearch terminates the query early. OpenSearch collects documents before sorting. Use with caution. OpenSearch applies this parameter to each shard handling the request. When possible, let OpenSearch perform early termination automatically. Avoid specifying this parameter for requests that target data streams with backing indexes across multiple data tiers.
* @param {string} [params.timeout] - Period each deletion request waits for active shards.
* @param {boolean} [params.version] - If `true`, returns the document version as part of a hit.
* @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operation. Set to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
* @param {boolean} [params.wait_for_completion=true] - If `true`, the request blocks until the operation is complete.
* @param {string} params.index - Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (`*`). To search all data streams or indices, omit this parameter or use `*` or `_all`.
* @param {string} params.index - Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams or indexes, omit this parameter or use `*` or `_all`.
* @param {object} params.body - The search definition using the Query DSL
*
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
Expand Down
2 changes: 1 addition & 1 deletion api/_core/exists.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
* @param {number} [params.version] - Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.
* @param {string} [params.version_type] - Specific version type: `external`, `external_gte`.
* @param {string} params.id - Identifier of the document.
* @param {string} params.index - Comma-separated list of data streams, indices, and aliases. Supports wildcards (`*`).
* @param {string} params.index - Comma-separated list of data streams, indexes, and aliases. Supports wildcards (`*`).
*
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
* @param {function} [callback] - Callback that handles errors and response
Expand Down
2 changes: 1 addition & 1 deletion api/_core/existsSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
* @param {number} [params.version] - Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.
* @param {string} [params.version_type] - Specific version type: `external`, `external_gte`.
* @param {string} params.id - Identifier of the document.
* @param {string} params.index - Comma-separated list of data streams, indices, and aliases. Supports wildcards (`*`).
* @param {string} params.index - Comma-separated list of data streams, indexes, and aliases. Supports wildcards (`*`).
*
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
* @param {function} [callback] - Callback that handles errors and response
Expand Down
8 changes: 4 additions & 4 deletions api/_core/fieldCaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@
const { normalizeArguments, parsePathParam } = require('../utils');

/**
* Returns the information about the capabilities of fields among multiple indices.
* Returns the information about the capabilities of fields among multiple indexes.
* <br/> See Also: {@link https://opensearch.org/docs/latest/field-types/supported-field-types/alias/#using-aliases-in-field-capabilities-api-operations - field_caps}
*
* @memberOf API-Core
*
* @param {object} [params]
* @param {boolean} [params.allow_no_indices] - If false, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting `foo*,bar*` returns an error if an index starts with foo but no index starts with bar.
* @param {boolean} [params.allow_no_indices] - If false, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. For example, a request targeting `foo*,bar*` returns an error if an index starts with foo but no index starts with bar.
* @param {string} [params.expand_wildcards] - Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`.
* @param {string} [params.fields] - Comma-separated list of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported.
* @param {boolean} [params.ignore_unavailable] - If `true`, missing or closed indices are not included in the response.
* @param {boolean} [params.ignore_unavailable] - If `true`, missing or closed indexes are not included in the response.
* @param {boolean} [params.include_unmapped=false] - If true, unmapped fields are included in the response.
* @param {string} [params.index] - Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (*). To target all data streams and indices, omit this parameter or use * or _all.
* @param {string} [params.index] - Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (*). To target all data streams and indexes, omit this parameter or use * or _all.
* @param {object} [params.body] - An index filter specified with the Query DSL
*
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
Expand Down
2 changes: 1 addition & 1 deletion api/_core/msearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
* @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, indices, and index aliases to search.
* @param {string} [params.index] - Comma-separated list of data streams, indexes, and index aliases to search.
* @param {array} params.body - The request definitions (metadata-search request definition pairs), separated by newlines
*
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
Expand Down
2 changes: 1 addition & 1 deletion api/_core/msearchTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
* @param {boolean} [params.rest_total_hits_as_int=false] - If `true`, the response returns `hits.total` as an integer. If `false`, it returns `hits.total` as an object.
* @param {string} [params.search_type] - The type of the search operation. Available options: `query_then_fetch`, `dfs_query_then_fetch`.
* @param {boolean} [params.typed_keys] - If `true`, the response prefixes aggregation and suggester names with their respective types.
* @param {string} [params.index] - Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (`*`). To search all data streams and indices, omit this parameter or use `*`.
* @param {string} [params.index] - Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams and indexes, omit this parameter or use `*`.
* @param {array} params.body - The request definitions (metadata-search request definition pairs), separated by newlines
*
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
Expand Down
8 changes: 4 additions & 4 deletions api/_core/rankEval.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
* @memberOf API-Core
*
* @param {object} params
* @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.
* @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {boolean} [params.ignore_unavailable] - If `true`, missing or closed indices are not included in the response.
* @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.
* @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indexes that are open, closed or both.
* @param {boolean} [params.ignore_unavailable] - If `true`, missing or closed indexes are not included in the response.
* @param {string} [params.search_type] - Search operation type
* @param {string} [params.index] - Comma-separated list of data streams, indices, and index aliases used to limit the request. Wildcard (`*`) expressions are supported. To target all data streams and indices in a cluster, omit this parameter or use `_all` or `*`.
* @param {string} [params.index] - Comma-separated list of data streams, indexes, and index aliases used to limit the request. Wildcard (`*`) expressions are supported. To target all data streams and indexes in a cluster, omit this parameter or use `_all` or `*`.
* @param {object} params.body - The ranking evaluation search definition, including search requests, document ratings and ranking metric definition.
*
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
Expand Down
Loading

0 comments on commit a1bae0b

Please sign in to comment.