Skip to content
Open
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
142 changes: 142 additions & 0 deletions api/OpenSearchApi.d.ts

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions api/OpenSearchApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class OpenSearchAPI {
cluster: new(require('./cluster/_api'))(this),
danglingIndices: new(require('./danglingIndices/_api'))(this),
flowFramework: new(require('./flowFramework/_api'))(this),
geospatial: new(require('./geospatial/_api'))(this),
http: new(require('./http/_api'))(this),
indices: new(require('./indices/_api'))(this),
ingest: new(require('./ingest/_api'))(this),
Expand All @@ -37,6 +38,7 @@ class OpenSearchAPI {
list: new(require('./list/_api'))(this),
ltr: new(require('./ltr/_api'))(this),
ml: new(require('./ml/_api'))(this),
neural: new(require('./neural/_api'))(this),
nodes: new(require('./nodes/_api'))(this),
notifications: new(require('./notifications/_api'))(this),
observability: new(require('./observability/_api'))(this),
Expand All @@ -46,6 +48,7 @@ class OpenSearchAPI {
replication: new(require('./replication/_api'))(this),
rollups: new(require('./rollups/_api'))(this),
searchPipeline: new(require('./searchPipeline/_api'))(this),
searchRelevance: new(require('./searchRelevance/_api'))(this),
security: new(require('./security/_api'))(this),
sm: new(require('./sm/_api'))(this),
snapshot: new(require('./snapshot/_api'))(this),
Expand Down Expand Up @@ -159,6 +162,7 @@ class OpenSearchAPI {
cluster: { get() { return this[kApiModules].cluster } },
danglingIndices: { get() { return this[kApiModules].danglingIndices } },
flowFramework: { get() { return this[kApiModules].flowFramework } },
geospatial: { get() { return this[kApiModules].geospatial } },
http: { get() { return this[kApiModules].http } },
indices: { get() { return this[kApiModules].indices } },
ingest: { get() { return this[kApiModules].ingest } },
Expand All @@ -168,6 +172,7 @@ class OpenSearchAPI {
list: { get() { return this[kApiModules].list } },
ltr: { get() { return this[kApiModules].ltr } },
ml: { get() { return this[kApiModules].ml } },
neural: { get() { return this[kApiModules].neural } },
nodes: { get() { return this[kApiModules].nodes } },
notifications: { get() { return this[kApiModules].notifications } },
observability: { get() { return this[kApiModules].observability } },
Expand All @@ -177,6 +182,7 @@ class OpenSearchAPI {
replication: { get() { return this[kApiModules].replication } },
rollups: { get() { return this[kApiModules].rollups } },
searchPipeline: { get() { return this[kApiModules].searchPipeline } },
searchRelevance: { get() { return this[kApiModules].searchRelevance } },
security: { get() { return this[kApiModules].security } },
sm: { get() { return this[kApiModules].sm } },
snapshot: { get() { return this[kApiModules].snapshot } },
Expand All @@ -195,6 +201,8 @@ class OpenSearchAPI {
remote_store: { get() { return this[kApiModules].remoteStore } },
// Deprecated: Use searchPipeline instead.
search_pipeline: { get() { return this[kApiModules].searchPipeline } },
// Deprecated: Use searchRelevance instead.
search_relevance: { get() { return this[kApiModules].searchRelevance } },
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion api/_core/bulk.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface Bulk_Request extends Global.Params {
pipeline?: string;
refresh?: Common.Refresh;
require_alias?: boolean;
routing?: Common.RoutingInQueryString;
routing?: Common.Routing;
timeout?: Common.Duration;
type?: string;
wait_for_active_shards?: Common.WaitForActiveShards;
Expand Down
2 changes: 1 addition & 1 deletion api/_core/bulk.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
* @param {string} [params.pipeline] - ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request. If a final pipeline is configured it will always run, regardless of the value of this parameter.
* @param {string} [params.refresh] - If `true`, OpenSearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`.
* @param {boolean} [params.require_alias=false] - If `true`, the request's actions must target an index alias.
* @param {string} [params.routing] - Custom value used to route operations to a specific shard.
* @param {string} [params.routing] - A custom value used to route operations to a specific shard.
* @param {string} [params.timeout] - Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
* @param {string} [params.type] - Default document type for items which don't provide one.
* @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`).
Expand Down
2 changes: 1 addition & 1 deletion api/_core/bulkStream.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
* @param {string} [params.pipeline] - ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request. If a final pipeline is configured it will always run, regardless of the value of this parameter.
* @param {string} [params.refresh] - If `true`, OpenSearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`.
* @param {boolean} [params.require_alias=false] - If `true`, the request's actions must target an index alias.
* @param {string} [params.routing] - Custom value used to route operations to a specific shard.
* @param {string} [params.routing] - A custom value used to route operations to a specific shard.
* @param {string} [params.timeout] - Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
* @param {string} [params.type] - Default document type for items which don't provide one.
* @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`).
Expand Down
2 changes: 1 addition & 1 deletion api/_core/count.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const { normalizeArguments, parsePathParam } = require('../utils');
* @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 {string} [params.routing] - A 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, 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)
Expand Down
2 changes: 1 addition & 1 deletion api/_core/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Returns a 409 response when a document with a same ID already exists in the inde
* @param {object} params
* @param {string} [params.pipeline] - ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request. If a final pipeline is configured it will always run, regardless of the value of this parameter.
* @param {string} [params.refresh] - If `true`, OpenSearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`.
* @param {string} [params.routing] - Custom value used to route operations to a specific shard.
* @param {string} [params.routing] - A custom value used to route operations to a specific shard.
* @param {string} [params.timeout] - Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
* @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`.
Expand Down
2 changes: 1 addition & 1 deletion api/_core/delete.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
* @param {number} [params.if_primary_term] - Only perform the operation if the document has this primary term.
* @param {number} [params.if_seq_no] - Only perform the operation if the document has this sequence number.
* @param {string} [params.refresh] - If `true`, OpenSearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`.
* @param {string} [params.routing] - Custom value used to route operations to a specific shard.
* @param {string} [params.routing] - A custom value used to route operations to a specific shard.
* @param {string} [params.timeout] - Period to wait for active shards.
* @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`.
Expand Down
2 changes: 1 addition & 1 deletion api/_core/deleteByQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
* @param {string} [params.refresh] - If `true`, OpenSearch refreshes all shards involved in the delete by query after the request completes.
* @param {boolean} [params.request_cache] - If `true`, the request cache is used for this request. Defaults to the index-level setting.
* @param {number} [params.requests_per_second=0] - The throttle for this request in sub-requests per second.
* @param {string} [params.routing] - Custom value used to route operations to a specific shard.
* @param {string} [params.routing] - A custom value used to route operations to a specific shard.
* @param {string} [params.scroll] - Period to retain the search context for scrolling.
* @param {number} [params.scroll_size=100] - Size of the scroll request that powers the operation.
* @param {string} [params.search_timeout] - Explicit timeout for each search request. Defaults to no timeout.
Expand Down
2 changes: 1 addition & 1 deletion api/_core/explain.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export type Explain_ResponseBody = {
_id: Common.Id;
_index: Common.IndexName;
_type?: Common.Type;
explanation?: Core_Explain.ExplanationDetail;
explanation?: Core_Explain.Explanation;
get?: Common.InlineGet;
matched: boolean;
}
Expand Down
4 changes: 2 additions & 2 deletions api/_core/explain.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');

/**
* Returns information about why a specific matches (or doesn't match) a query.
* Returns information about why a specific document matches (or doesn't match) a query.
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/explain/ - explain}
*
* @memberOf API-Core
Expand All @@ -35,7 +35,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
* @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 {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 {string} [params.routing] - A custom value used to route operations to a specific shard.
* @param {string} [params.stored_fields] - A comma-separated list of stored fields to return in the response.
* @param {string} params.id - Defines the document ID.
* @param {string} params.index - Index names used to limit the request. Only a single index name can be provided to this parameter.
Expand Down
4 changes: 2 additions & 2 deletions api/_core/get.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
* @param {string} [params.stored_fields] - List of stored fields to return as part of a hit. If no fields are specified, no stored fields are included in the response. If this field is specified, the `_source` parameter defaults to false.
* @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: `internal`, `external`, `external_gte`.
* @param {string} params.id - Unique identifier of the document.
* @param {string} params.index - Name of the index that contains the document.
* @param {string} params.id - The unique identifier of the document.
* @param {string} params.index - The name of the index that contains the document.
*
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
* @param {function} [callback] - Callback that handles errors and response
Expand Down
4 changes: 2 additions & 2 deletions api/_core/getSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
* @param {string} [params.routing] - Target the specified primary shard.
* @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. One of `internal`, `external`, `external_gte`.
* @param {string} params.id - Unique identifier of the document.
* @param {string} params.index - Name of the index that contains the document.
* @param {string} params.id - The unique identifier of the document.
* @param {string} params.index - The name of the index that contains the document.
*
* @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/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
* @param {string} [params.pipeline] - ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request. If a final pipeline is configured it will always run, regardless of the value of this parameter.
* @param {string} [params.refresh] - If `true`, OpenSearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`.
* @param {boolean} [params.require_alias=false] - If `true`, the destination must be an index alias.
* @param {string} [params.routing] - Custom value used to route operations to a specific shard.
* @param {string} [params.routing] - A custom value used to route operations to a specific shard.
* @param {string} [params.timeout] - Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
* @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`.
Expand Down
2 changes: 1 addition & 1 deletion api/_core/mget.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
* @param {string} [params.preference=random] - Specifies the node or shard the operation should be performed on. Random by default.
* @param {boolean} [params.realtime] - If `true`, the request is real-time as opposed to near-real-time.
* @param {string} [params.refresh] - If `true`, the request refreshes relevant shards before retrieving documents.
* @param {string} [params.routing] - Custom value used to route operations to a specific shard.
* @param {string} [params.routing] - A custom value used to route operations to a specific shard.
* @param {string} [params.stored_fields] - If `true`, retrieves the document fields stored in the index rather than the document `_source`.
* @param {string} [params.index] - Name of the index to retrieve documents from when `ids` are specified, or when a document in the `docs` array does not specify an index.
* @param {object} params.body - Document identifiers; can be either `docs` (containing full document information) or `ids` (when index is provided in the URL.
Expand Down
Loading
Loading