Methods |
public
|
__construct(
Transport $transport,
callable|EndpointFactoryInterface $endpointFactory,
NamespaceBuilderInterface[] $registeredNamespaces,
)
Client constructor
|
#
|
public
|
bulk(array $params = []): array
Allows to perform multiple index/update/delete operations in a single request.
Allows to perform multiple index/update/delete operations in a single request.
$params['index'] = (string) Name of the data stream, index, or index alias to perform bulk actions on.
$params['_source'] = (any) true or false to return the _source field or not, or a list of fields to return.
$params['_source_excludes'] = (any) A comma-separated list of source fields to exclude from the response.
$params['_source_includes'] = (any) A comma-separated list of source fields to include in the response.
$params['pipeline'] = (string) 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.
$params['refresh'] = (enum) 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 . (Options = false,true,wait_for)
$params['require_alias'] = (boolean) If true , the request's actions must target an index alias. (Default = false)
$params['routing'] = (any) Custom value used to route operations to a specific shard.
$params['timeout'] = (string) Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
$params['wait_for_active_shards'] = (any) 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 ).
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
$params['body'] = (array) The operation definition and data (action-data pairs), separated by newlines (Required)
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
bulkStream(array $params = []): array
Allows to perform multiple index/update/delete operations using request response streaming.
Allows to perform multiple index/update/delete operations using request response streaming.
$params['index'] = (string) Name of the data stream, index, or index alias to perform bulk actions on.
$params['_source'] = (any) true or false to return the _source field or not, or a list of fields to return.
$params['_source_excludes'] = (any) A comma-separated list of source fields to exclude from the response.
$params['_source_includes'] = (any) A comma-separated list of source fields to include in the response.
$params['batch_interval'] = (string) Specifies for how long bulk operations should be accumulated into a batch before sending the batch to data nodes.
$params['batch_size'] = (integer) Specifies how many bulk operations should be accumulated into a batch before sending the batch to data nodes.
$params['pipeline'] = (string) 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.
$params['refresh'] = (enum) 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 . (Options = false,true,wait_for)
$params['require_alias'] = (boolean) If true , the request's actions must target an index alias. (Default = false)
$params['routing'] = (any) Custom value used to route operations to a specific shard.
$params['timeout'] = (string) Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
$params['wait_for_active_shards'] = (any) 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 ).
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
$params['body'] = (array) The operation definition and data (action-data pairs), separated by newlines (Required)
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
clearScroll(array $params = []): array
Explicitly clears the search context for a scroll.
Explicitly clears the search context for a scroll.
$params['scroll_id'] = DEPRECATED (array) Comma-separated list of scroll IDs to clear. To clear all scroll IDs, use _all .
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
$params['body'] = (array) Comma-separated list of scroll IDs to clear if none was specified using the scroll_id parameter
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
count(array $params = []): array
Returns number of documents matching a query.
Returns number of documents matching a query.
$params['index'] = (array) 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 .
$params['allow_no_indices'] = (boolean) 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.
$params['analyze_wildcard'] = (boolean) If true , wildcard and prefix queries are analyzed.This parameter can only be used when the q query string parameter is specified. (Default = false)
$params['analyzer'] = (string) Analyzer to use for the query string.This parameter can only be used when the q query string parameter is specified.
$params['default_operator'] = (enum) The default operator for query string query: AND or OR .This parameter can only be used when the q query string parameter is specified. (Options = and,or)
$params['df'] = (string) 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.
$params['expand_wildcards'] = (any) 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 .
$params['ignore_throttled'] = (boolean) If true , concrete, expanded or aliased indexes are ignored when frozen.
$params['ignore_unavailable'] = (boolean) If false , the request returns an error if it targets a missing or closed index.
$params['lenient'] = (boolean) If true , format-based query failures (such as providing text to a numeric field) in the query string will be ignored.
$params['min_score'] = (number) Sets the minimum _score value that documents must have to be included in the result.
$params['preference'] = (string) Specifies the node or shard the operation should be performed on.Random by default. (Default = random)
$params['q'] = (string) Query in the Lucene query string syntax.
$params['routing'] = (any) Custom value used to route operations to a specific shard.
$params['terminate_after'] = (integer) 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.
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
$params['body'] = (array) Query to restrict the results specified with the Query DSL (optional)
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
createPit(array $params = []): array
Creates point in time context.
Creates point in time context.
$params['index'] = (array) Comma-separated list of indexes; use _all or empty string to perform the operation on all indexes. (Required)
$params['allow_partial_pit_creation'] = (boolean) Allow if point in time can be created with partial failures.
$params['expand_wildcards'] = (any) Whether to expand wildcard expression to concrete indexes that are open, closed or both.
$params['keep_alive'] = (string) Specify the keep alive for point in time.
$params['preference'] = (string) Specify the node or shard the operation should be performed on. (Default = random)
$params['routing'] = (any) Comma-separated list of specific routing values.
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
delete(array $params = []): array
Removes a document from the index.
Removes a document from the index.
$params['id'] = (string) Unique identifier for the document. (Required)
$params['index'] = (string) Name of the target index. (Required)
$params['if_primary_term'] = (integer) Only perform the operation if the document has this primary term.
$params['if_seq_no'] = (integer) Only perform the operation if the document has this sequence number.
$params['refresh'] = (enum) 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 . (Options = false,true,wait_for)
$params['routing'] = (any) Custom value used to route operations to a specific shard.
$params['timeout'] = (string) Period to wait for active shards.
$params['version'] = (integer) Explicit version number for concurrency control.The specified version must match the current version of the document for the request to succeed.
$params['version_type'] = (enum) Specific version type: external , external_gte . (Options = external,external_gte,force,internal)
$params['wait_for_active_shards'] = (any) 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 ).
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
deleteAllPits(array $params = []): array
Deletes all active point in time searches.
Deletes all active point in time searches.
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
deleteByQuery(array $params = []): array
Deletes documents matching the provided query.
Deletes documents matching the provided query.
$params['index'] = (array) 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 . (Required)
$params['_source'] = (array) True or false to return the _source field or not, or a list of fields to return.
$params['_source_excludes'] = (array) List of fields to exclude from the returned _source field.
$params['_source_includes'] = (array) List of fields to extract and return from the _source field.
$params['allow_no_indices'] = (boolean) 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 .
$params['analyze_wildcard'] = (boolean) If true , wildcard and prefix queries are analyzed. (Default = false)
$params['analyzer'] = (string) Analyzer to use for the query string.
$params['conflicts'] = (enum) What to do if delete by query hits version conflicts: abort or proceed . (Options = abort,proceed)
$params['default_operator'] = (enum) The default operator for query string query: AND or OR . (Options = and,or)
$params['df'] = (string) Field to use as default where no field prefix is given in the query string.
$params['expand_wildcards'] = (any) 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 . Valid values are: all , open , closed , hidden , none .
$params['from'] = (integer) Starting offset. (Default = 0)
$params['ignore_unavailable'] = (boolean) If false , the request returns an error if it targets a missing or closed index.
$params['lenient'] = (boolean) If true , format-based query failures (such as providing text to a numeric field) in the query string will be ignored.
$params['max_docs'] = (integer) Maximum number of documents to process.Defaults to all documents.
$params['preference'] = (string) Specifies the node or shard the operation should be performed on.Random by default. (Default = random)
$params['q'] = (string) Query in the Lucene query string syntax.
$params['refresh'] = (boolean) If true , OpenSearch refreshes all shards involved in the delete by query after the request completes.
$params['request_cache'] = (boolean) If true , the request cache is used for this request.Defaults to the index-level setting.
$params['requests_per_second'] = (number) The throttle for this request in sub-requests per second. (Default = 0)
$params['routing'] = (any) Custom value used to route operations to a specific shard.
$params['scroll'] = (string) Period to retain the search context for scrolling.
$params['scroll_size'] = (integer) Size of the scroll request that powers the operation. (Default = 100)
$params['search_timeout'] = (string) Explicit timeout for each search request.Defaults to no timeout.
$params['search_type'] = (enum) The type of the search operation.Available options: query_then_fetch , dfs_query_then_fetch . (Options = dfs_query_then_fetch,query_then_fetch)
$params['size'] = (integer) Deprecated, please use max_docs instead.
$params['slices'] = (any) The number of slices this task should be divided into.
$params['sort'] = (array) A comma-separated list of : pairs.
$params['stats'] = (array) Specific tag of the request for logging and statistical purposes.
$params['terminate_after'] = (integer) 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.
$params['timeout'] = (string) Period each deletion request waits for active shards.
$params['version'] = (boolean) If true , returns the document version as part of a hit.
$params['wait_for_active_shards'] = (any) 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 ).
$params['wait_for_completion'] = (boolean) If true , the request blocks until the operation is complete. (Default = true)
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
$params['body'] = (array) The search definition using the Query DSL (Required)
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
deleteByQueryRethrottle(array $params = []): array
Changes the number of requests per second for a particular Delete By Query operation.
Changes the number of requests per second for a particular Delete By Query operation.
$params['task_id'] = (number) The ID for the task. (Required)
$params['requests_per_second'] = (number) The throttle for this request in sub-requests per second.
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
deletePit(array $params = []): array
Deletes one or more point in time searches based on the IDs passed.
Deletes one or more point in time searches based on the IDs passed.
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
$params['body'] = (array) The point-in-time ids to be deleted
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
deleteScript(array $params = []): array
Deletes a script.
Deletes a script.
$params['id'] = (string) Identifier for the stored script or search template. (Required)
$params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node.
$params['master_timeout'] = (string) 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.
$params['timeout'] = (string) Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error.
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
exists(array $params = []): bool
Returns information about whether a document exists in an index.
Returns information about whether a document exists in an index.
$params['id'] = (string) Identifier of the document. (Required)
$params['index'] = (string) Comma-separated list of data streams, indexes, and aliases. Supports wildcards (* ). (Required)
$params['_source'] = (any) true or false to return the _source field or not, or a list of fields to return.
$params['_source_excludes'] = (any) A comma-separated list of source fields to exclude in the response.
$params['_source_includes'] = (any) A comma-separated list of source fields to include in the response.
$params['preference'] = (string) Specifies the node or shard the operation should be performed on.Random by default. (Default = random)
$params['realtime'] = (boolean) If true , the request is real-time as opposed to near-real-time.
$params['refresh'] = (boolean) If true , OpenSearch refreshes all shards involved in the delete by query after the request completes.
$params['routing'] = (any) Target the specified primary shard.
$params['stored_fields'] = (any) 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.
$params['version'] = (integer) Explicit version number for concurrency control.The specified version must match the current version of the document for the request to succeed.
$params['version_type'] = (enum) Specific version type: external , external_gte . (Options = external,external_gte,force,internal)
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
existsSource(array $params = []): bool
Returns information about whether a document source exists in an index.
Returns information about whether a document source exists in an index.
$params['id'] = (string) Identifier of the document. (Required)
$params['index'] = (string) Comma-separated list of data streams, indexes, and aliases. Supports wildcards (* ). (Required)
$params['_source'] = (any) true or false to return the _source field or not, or a list of fields to return.
$params['_source_excludes'] = (any) A comma-separated list of source fields to exclude in the response.
$params['_source_includes'] = (any) A comma-separated list of source fields to include in the response.
$params['preference'] = (string) Specifies the node or shard the operation should be performed on.Random by default. (Default = random)
$params['realtime'] = (boolean) If true, the request is real-time as opposed to near-real-time.
$params['refresh'] = (boolean) If true , OpenSearch refreshes all shards involved in the delete by query after the request completes.
$params['routing'] = (any) Target the specified primary shard.
$params['version'] = (integer) Explicit version number for concurrency control.The specified version must match the current version of the document for the request to succeed.
$params['version_type'] = (enum) Specific version type: external , external_gte . (Options = external,external_gte,force,internal)
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
explain(array $params = []): array
Returns information about why a specific matches (or doesn't match) a query.
Returns information about why a specific matches (or doesn't match) a query.
$params['id'] = (string) Defines the document ID. (Required)
$params['index'] = (string) Index names used to limit the request. Only a single index name can be provided to this parameter. (Required)
$params['_source'] = (any) True or false to return the _source field or not, or a list of fields to return.
$params['_source_excludes'] = (any) A comma-separated list of source fields to exclude from the response.
$params['_source_includes'] = (any) A comma-separated list of source fields to include in the response.
$params['analyze_wildcard'] = (boolean) If true , wildcard and prefix queries are analyzed. (Default = false)
$params['analyzer'] = (string) Analyzer to use for the query string.This parameter can only be used when the q query string parameter is specified.
$params['default_operator'] = (enum) The default operator for query string query: AND or OR . (Options = and,or)
$params['df'] = (string) Field to use as default where no field prefix is given in the query string. (Default = _all)
$params['lenient'] = (boolean) If true , format-based query failures (such as providing text to a numeric field) in the query string will be ignored.
$params['preference'] = (string) Specifies the node or shard the operation should be performed on.Random by default. (Default = random)
$params['q'] = (string) Query in the Lucene query string syntax.
$params['routing'] = (any) Custom value used to route operations to a specific shard.
$params['stored_fields'] = (any) A comma-separated list of stored fields to return in the response.
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
$params['body'] = (array) The query definition using the Query DSL
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
fieldCaps(array $params = []): array
Returns the information about the capabilities of fields among multiple indexes.
Returns the information about the capabilities of fields among multiple indexes.
$params['index'] = (array) 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.
$params['allow_no_indices'] = (boolean) 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 requesttargeting foo*,bar* returns an error if an index starts with foo but no index starts with bar.
$params['expand_wildcards'] = (any) 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 .
$params['fields'] = (any) Comma-separated list of fields to retrieve capabilities for. Wildcard (* ) expressions are supported.
$params['ignore_unavailable'] = (boolean) If true , missing or closed indexes are not included in the response.
$params['include_unmapped'] = (boolean) If true, unmapped fields are included in the response. (Default = false)
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
$params['body'] = (array) An index filter specified with the Query DSL
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
get(array $params = []): array
Returns a document.
Returns a document.
$params['id'] = (string) Unique identifier of the document. (Required)
$params['index'] = (string) Name of the index that contains the document. (Required)
$params['_source'] = (any) True or false to return the _source field or not, or a list of fields to return.
$params['_source_excludes'] = (any) A comma-separated list of source fields to exclude in the response.
$params['_source_includes'] = (any) A comma-separated list of source fields to include in the response.
$params['preference'] = (string) Specifies the node or shard the operation should be performed on. Random by default. (Default = random)
$params['realtime'] = (boolean) If true , the request is real-time as opposed to near-real-time.
$params['refresh'] = (boolean) If true, OpenSearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes.
$params['routing'] = (any) Target the specified primary shard.
$params['stored_fields'] = (any) 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.
$params['version'] = (integer) Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.
$params['version_type'] = (enum) Specific version type: internal, external, external_gte. (Options = external,external_gte,force,internal)
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
getAllPits(array $params = []): array
Lists all active point in time searches.
Lists all active point in time searches.
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
getScript(array $params = []): array
Returns a script.
Returns a script.
$params['id'] = (string) Identifier for the stored script or search template. (Required)
$params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node.
$params['master_timeout'] = (string) Specify timeout for connection to master
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
getScriptContext(array $params = []): array
Returns all script contexts.
Returns all script contexts.
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
getScriptLanguages(array $params = []): array
Returns available script types, languages and contexts.
Returns available script types, languages and contexts.
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
getSource(array $params = []): array
Returns the source of a document.
Returns the source of a document.
$params['id'] = (string) Unique identifier of the document. (Required)
$params['index'] = (string) Name of the index that contains the document. (Required)
$params['_source'] = (any) True or false to return the _source field or not, or a list of fields to return.
$params['_source_excludes'] = (any) A comma-separated list of source fields to exclude in the response.
$params['_source_includes'] = (any) A comma-separated list of source fields to include in the response.
$params['preference'] = (string) Specifies the node or shard the operation should be performed on. Random by default. (Default = random)
$params['realtime'] = (boolean) Boolean) If true, the request is real-time as opposed to near-real-time.
$params['refresh'] = (boolean) If true, OpenSearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes.
$params['routing'] = (any) Target the specified primary shard.
$params['version'] = (integer) Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.
$params['version_type'] = (enum) Specific version type: internal, external, external_gte. (Options = external,external_gte,force,internal)
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
index(array $params = []): array
Creates or updates a document in an index.
Creates or updates a document in an index.
$params['index'] = (string) Name of the data stream or index to target. (Required)
$params['id'] = (string) Unique identifier for the document.
$params['if_primary_term'] = (integer) Only perform the operation if the document has this primary term.
$params['if_seq_no'] = (integer) Only perform the operation if the document has this sequence number.
$params['op_type'] = (enum) Set to create to only index the document if it does not already exist (put if absent).If a document with the specified _id already exists, the indexing operation will fail.Same as using the <index>/_create endpoint.Valid values: index , create .If document id is specified, it defaults to index .Otherwise, it defaults to create . (Options = create,index)
$params['pipeline'] = (string) 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.
$params['refresh'] = (enum) 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 . (Options = false,true,wait_for)
$params['require_alias'] = (boolean) If true , the destination must be an index alias. (Default = false)
$params['routing'] = (any) Custom value used to route operations to a specific shard.
$params['timeout'] = (string) Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
$params['version'] = (integer) Explicit version number for concurrency control.The specified version must match the current version of the document for the request to succeed.
$params['version_type'] = (enum) Specific version type: external , external_gte . (Options = external,external_gte,force,internal)
$params['wait_for_active_shards'] = (any) 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 ).
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
$params['body'] = (array) The document (Required)
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
info(array $params = []): array
Returns basic information about the cluster.
Returns basic information about the cluster.
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
mget(array $params = []): array
Allows to get multiple documents in one request.
Allows to get multiple documents in one request.
$params['index'] = (string) 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.
$params['_source'] = (any) True or false to return the _source field or not, or a list of fields to return.
$params['_source_excludes'] = (any) A comma-separated list of source fields to exclude from the response.You can also use this parameter to exclude fields from the subset specified in _source_includes query parameter.
$params['_source_includes'] = (any) A comma-separated list of source fields to include in the response.If this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the _source_excludes query parameter.If the _source parameter is false , this parameter is ignored.
$params['preference'] = (string) Specifies the node or shard the operation should be performed on. Random by default. (Default = random)
$params['realtime'] = (boolean) If true , the request is real-time as opposed to near-real-time.
$params['refresh'] = (boolean) If true , the request refreshes relevant shards before retrieving documents.
$params['routing'] = (any) Custom value used to route operations to a specific shard.
$params['stored_fields'] = (any) If true , retrieves the document fields stored in the index rather than the document _source .
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
$params['body'] = (array) Document identifiers; can be either docs (containing full document information) or ids (when index is provided in the URL. (Required)
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
msearch(array $params = []): array
Allows to execute several search operations in one request.
Allows to execute several search operations in one request.
$params['index'] = (array) Comma-separated list of data streams, indexes, and index aliases to search.
$params['ccs_minimize_roundtrips'] = (boolean) If true, network roundtrips between the coordinating node and remote clusters are minimized for cross-cluster search requests. (Default = true)
$params['max_concurrent_searches'] = (integer) Maximum number of concurrent searches the multi search API can execute.
$params['max_concurrent_shard_requests'] = (integer) Maximum number of concurrent shard requests that each sub-search request executes per node. (Default = 5)
$params['pre_filter_shard_size'] = (integer) 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.
$params['rest_total_hits_as_int'] = (boolean) If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object. (Default = false)
$params['search_type'] = (enum) Indicates whether global term and document frequencies should be used when scoring returned documents. (Options = dfs_query_then_fetch,query_then_fetch)
$params['typed_keys'] = (boolean) Specifies whether aggregation and suggester names should be prefixed by their respective types in the response.
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
$params['body'] = (array) The request definitions (metadata-search request definition pairs), separated by newlines (Required)
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
msearchTemplate(array $params = []): array
Allows to execute several search template operations in one request.
Allows to execute several search template operations in one request.
$params['index'] = (array) 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 * .
$params['ccs_minimize_roundtrips'] = (boolean) If true , network round-trips are minimized for cross-cluster search requests. (Default = true)
$params['max_concurrent_searches'] = (integer) Maximum number of concurrent searches the API can run.
$params['rest_total_hits_as_int'] = (boolean) If true , the response returns hits.total as an integer.If false , it returns hits.total as an object. (Default = false)
$params['search_type'] = (enum) The type of the search operation.Available options: query_then_fetch , dfs_query_then_fetch . (Options = dfs_query_then_fetch,query_then_fetch)
$params['typed_keys'] = (boolean) If true , the response prefixes aggregation and suggester names with their respective types.
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
$params['body'] = (array) The request definitions (metadata-search request definition pairs), separated by newlines (Required)
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
mtermvectors(array $params = []): array
Returns multiple termvectors in one request.
Returns multiple termvectors in one request.
$params['index'] = (string) Name of the index that contains the documents.
$params['field_statistics'] = (boolean) If true , the response includes the document count, sum of document frequencies, and sum of total term frequencies. (Default = true)
$params['fields'] = (any) Comma-separated list or wildcard expressions of fields to include in the statistics.Used as the default list unless a specific field list is provided in the completion_fields or fielddata_fields parameters.
$params['ids'] = (array) A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body
$params['offsets'] = (boolean) If true , the response includes term offsets. (Default = true)
$params['payloads'] = (boolean) If true , the response includes term payloads. (Default = true)
$params['positions'] = (boolean) If true , the response includes term positions. (Default = true)
$params['preference'] = (string) Specifies the node or shard the operation should be performed on.Random by default. (Default = random)
$params['realtime'] = (boolean) If true, the request is real-time as opposed to near-real-time. (Default = true)
$params['routing'] = (any) Custom value used to route operations to a specific shard.
$params['term_statistics'] = (boolean) If true, the response includes term frequency and document frequency. (Default = false)
$params['version'] = (integer) If true , returns the document version as part of a hit.
$params['version_type'] = (enum) Specific version type. (Options = external,external_gte,force,internal)
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
$params['body'] = (array) Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation.
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
ping(array $params = []): bool
Returns whether the cluster is running.
Returns whether the cluster is running.
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
putScript(array $params = []): array
Creates or updates a script.
Creates or updates a script.
$params['id'] = (string) Identifier for the stored script or search template. Must be unique within the cluster. (Required)
$params['context'] = (string) Context in which the script or search template should run. To prevent errors, the API immediately compiles the script or template in this context.
$params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node.
$params['master_timeout'] = (string) 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.
$params['timeout'] = (string) Period to wait for a response.If no response is received before the timeout expires, the request fails and returns an error.
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
$params['body'] = (array) The document (Required)
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
rankEval(array $params = []): array
Allows to evaluate the quality of ranked search results over a set of typical search queries.
Allows to evaluate the quality of ranked search results over a set of typical search queries.
$params['index'] = (array) 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 * .
$params['allow_no_indices'] = (boolean) 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 .
$params['expand_wildcards'] = (any) Whether to expand wildcard expression to concrete indexes that are open, closed or both.
$params['ignore_unavailable'] = (boolean) If true , missing or closed indexes are not included in the response.
$params['search_type'] = (enum) Search operation type (Options = dfs_query_then_fetch,query_then_fetch)
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
$params['body'] = (array) The ranking evaluation search definition, including search requests, document ratings and ranking metric definition. (Required)
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
reindex(array $params = []): array
Allows to copy documents from one index to another, optionally filtering the sourcedocuments by a query, changing the…
Allows to copy documents from one index to another, optionally filtering the sourcedocuments by a query, changing the destination index settings, or fetching thedocuments from a remote cluster.
$params['max_docs'] = (integer) Maximum number of documents to process. By default, all documents.
$params['refresh'] = (boolean) If true , the request refreshes affected shards to make this operation visible to search.
$params['requests_per_second'] = (number) The throttle for this request in sub-requests per second.Defaults to no throttle. (Default = 0)
$params['scroll'] = (string) Specifies how long a consistent view of the index should be maintained for scrolled search.
$params['slices'] = (any) The number of slices this task should be divided into.Defaults to 1 slice, meaning the task isn't sliced into subtasks.
$params['timeout'] = (string) Period each indexing waits for automatic index creation, dynamic mapping updates, and waiting for active shards.
$params['wait_for_active_shards'] = (any) 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 ).
$params['wait_for_completion'] = (boolean) If true , the request blocks until the operation is complete. (Default = true)
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
$params['body'] = (array) The search definition using the Query DSL and the prototype for the index request. (Required)
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
reindexRethrottle(array $params = []): array
Changes the number of requests per second for a particular Reindex operation.
Changes the number of requests per second for a particular Reindex operation.
$params['task_id'] = (string) Identifier for the task. (Required)
$params['requests_per_second'] = (number) The throttle for this request in sub-requests per second.
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
renderSearchTemplate(array $params = []): array
Allows to use the Mustache language to pre-render a search definition.
Allows to use the Mustache language to pre-render a search definition.
$params['id'] = (string) ID of the search template to render. If no source is specified, this or the id request body parameter is required.
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
$params['body'] = (array) The search definition template and its params
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
scriptsPainlessExecute(array $params = []): array
Allows an arbitrary script to be executed and a result to be returned.
Allows an arbitrary script to be executed and a result to be returned.
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
$params['body'] = (array) The script to execute
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
scroll(array $params = []): array
Allows to retrieve a large numbers of results from a single search request.
Allows to retrieve a large numbers of results from a single search request.
$params['scroll_id'] = DEPRECATED (string) The scroll ID
$params['rest_total_hits_as_int'] = (boolean) If true, the API response's hit.total property is returned as an integer. If false, the API response's hit.total property is returned as an object. (Default = false)
$params['scroll'] = (string) Period to retain the search context for scrolling.
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
$params['body'] = (array) The scroll ID if not passed by URL or query parameter.
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
search(array $params = []): array
Returns results matching a query.
Returns results matching a query.
$params['index'] = (array) 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 .
$params['_source'] = (any) Indicates which source fields are returned for matching documents.These fields are returned in the hits._source property of the search response.Valid values are:true to return the entire document source;false to not return the document source;<string> to return the source fields that are specified as a comma-separated list (supports wildcard (* ) patterns).
$params['_source_excludes'] = (any) A comma-separated list of source fields to exclude from the response.You can also use this parameter to exclude fields from the subset specified in _source_includes query parameter.If the _source parameter is false , this parameter is ignored.
$params['_source_includes'] = (any) A comma-separated list of source fields to include in the response.If this parameter is specified, only these source fields are returned.You can exclude fields from this subset using the _source_excludes query parameter.If the _source parameter is false , this parameter is ignored.
$params['allow_no_indices'] = (boolean) 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 .
$params['allow_partial_search_results'] = (boolean) If true, returns partial results if there are shard request timeouts or shard failures. If false, returns an error with no partial results. (Default = true)
$params['analyze_wildcard'] = (boolean) If true, wildcard and prefix queries are analyzed.This parameter can only be used when the q query string parameter is specified. (Default = false)
$params['analyzer'] = (string) Analyzer to use for the query string.This parameter can only be used when the q query string parameter is specified.
$params['batched_reduce_size'] = (integer) The number of shard results that should be reduced at once on the coordinating node.This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large. (Default = 512)
$params['cancel_after_time_interval'] = (string) The time after which the search request will be canceled.Request-level parameter takes precedence over cancel_after_time_interval cluster setting.
$params['ccs_minimize_roundtrips'] = (boolean) If true, network round-trips between the coordinating node and the remote clusters are minimized when executing cross-cluster search (CCS) requests. (Default = true)
$params['default_operator'] = (enum) The default operator for query string query: AND or OR.This parameter can only be used when the q query string parameter is specified. (Options = and,or)
$params['df'] = (string) 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.
$params['docvalue_fields'] = (any) A comma-separated list of fields to return as the docvalue representation for each hit.
$params['expand_wildcards'] = (any) 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 .
$params['explain'] = (boolean) If true , returns detailed information about score computation as part of a hit.
$params['from'] = (integer) Starting document offset.Needs to be non-negative.By default, you cannot page through more than 10,000 hits using the from and size parameters.To page through more hits, use the search_after parameter. (Default = 0)
$params['ignore_throttled'] = (boolean) If true , concrete, expanded or aliased indexes will be ignored when frozen.
$params['ignore_unavailable'] = (boolean) If false , the request returns an error if it targets a missing or closed index.
$params['include_named_queries_score'] = (boolean) Indicates whether hit.matched_queries should be rendered as a map that includes the name of the matched query associated with its score (true) or as an array containing the name of the matched queries (false) (Default = false)
$params['lenient'] = (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 only be used when the q query string parameter is specified.
$params['max_concurrent_shard_requests'] = (integer) Defines the number of concurrent shard requests per node this search executes 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. (Default = 5)
$params['phase_took'] = (boolean) Indicates whether to return phase-level took time values in the response. (Default = false)
$params['pre_filter_shard_size'] = (integer) 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 (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.
$params['preference'] = (string) Nodes and shards used for the search.By default, OpenSearch 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:<node-id>,<node-id> to run the search on only the specified nodes IDs, where, if suitable shards exist on more than one selected node, use shards on those nodes using the default method, or if none of the specified nodes are available, select shards from any available node using the default method;_prefer_nodes:<node-id>,<node-id> to if possible, run the search on the specified nodes IDs, or if not, select shards using the default method;_shards:<shard>,<shard> to run the search only on the specified shards;<custom-string> (any string that does not start with _ ) to route searches with the same <custom-string> to the same shards in the same order. (Default = random)
$params['q'] = (string) Query in the Lucene query string syntax using query parameter search.Query parameter searches do not support the full OpenSearch Query DSL but are handy for testing.
$params['request_cache'] = (boolean) If true , the caching of search results is enabled for requests where size is 0 .Defaults to index level settings.
$params['rest_total_hits_as_int'] = (boolean) Indicates whether hits.total should be rendered as an integer or an object in the rest search response. (Default = false)
$params['routing'] = (any) Custom value used to route operations to a specific shard.
$params['scroll'] = (string) Period to retain the search context for scrolling. See Scroll search results.By default, this value cannot exceed 1d (24 hours).You can change this limit using the search.max_keep_alive cluster-level setting.
$params['search_pipeline'] = (string) Customizable sequence of processing stages applied to search queries.
$params['search_type'] = (enum) How distributed term frequencies are calculated for relevance scoring. (Options = dfs_query_then_fetch,query_then_fetch)
$params['seq_no_primary_term'] = (boolean) If true , returns sequence number and primary term of the last modification of each hit.
$params['size'] = (integer) Defines the number of hits to return.By default, you cannot page through more than 10,000 hits using the from and size parameters.To page through more hits, use the search_after parameter. (Default = 10)
$params['sort'] = (any) A comma-separated list of : pairs.
$params['stats'] = (array) Specific tag of the request for logging and statistical purposes.
$params['stored_fields'] = (any) A comma-separated 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 .You can pass _source: true to return both source fields and stored fields in the search response.
$params['suggest_field'] = (string) Specifies which field to use for suggestions.
$params['suggest_mode'] = (enum) Specifies the suggest mode.This parameter can only be used when the suggest_field and suggest_text query string parameters are specified. (Options = always,missing,popular)
$params['suggest_size'] = (integer) Number of suggestions to return.This parameter can only be used when the suggest_field and suggest_text query string parameters are specified.
$params['suggest_text'] = (string) The source text for which the suggestions should be returned.This parameter can only be used when the suggest_field and suggest_text query string parameters are specified.
$params['terminate_after'] = (integer) 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.If set to 0 (default), the query does not terminate early.
$params['timeout'] = (string) Specifies the period of time to wait for a response from each shard.If no response is received before the timeout expires, the request fails and returns an error.
$params['track_scores'] = (boolean) If true , calculate and return document scores, even if the scores are not used for sorting.
$params['track_total_hits'] = (any) Number of hits matching the query to count accurately.If true , the exact number of hits is returned at the cost of some performance.If false , the response does not include the total number of hits matching the query.
$params['typed_keys'] = (boolean) If true , aggregation and suggester names are be prefixed by their respective types in the response.
$params['version'] = (boolean) If true , returns document version as part of a hit.
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
$params['body'] = (array) The search definition using the Query DSL
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
searchShards(array $params = []): array
Returns information about the indexes and shards that a search request would be executed against.
Returns information about the indexes and shards that a search request would be executed against.
$params['index'] = (array) Returns the indexes and shards that a search request would be executed against.
$params['allow_no_indices'] = (boolean) 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 .
$params['expand_wildcards'] = (any) 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 .Valid values are: all , open , closed , hidden , none .
$params['ignore_unavailable'] = (boolean) If false , the request returns an error if it targets a missing or closed index.
$params['local'] = (boolean) If true , the request retrieves information from the local node only. (Default = false)
$params['preference'] = (string) Specifies the node or shard the operation should be performed on.Random by default. (Default = random)
$params['routing'] = (any) Custom value used to route operations to a specific shard.
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
searchTemplate(array $params = []): array
Allows to use the Mustache language to pre-render a search definition.
Allows to use the Mustache language to pre-render a search definition.
$params['index'] = (array) Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (*).
$params['allow_no_indices'] = (boolean) 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 .
$params['ccs_minimize_roundtrips'] = (boolean) If true , network round-trips are minimized for cross-cluster search requests. (Default = true)
$params['expand_wildcards'] = (any) 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 .Valid values are: all , open , closed , hidden , none .
$params['explain'] = (boolean) If true , the response includes additional details about score computation as part of a hit.
$params['ignore_throttled'] = (boolean) If true , specified concrete, expanded, or aliased indexes are not included in the response when throttled.
$params['ignore_unavailable'] = (boolean) If false , the request returns an error if it targets a missing or closed index.
$params['preference'] = (string) Specifies the node or shard the operation should be performed on.Random by default. (Default = random)
$params['profile'] = (boolean) If true , the query execution is profiled.
$params['rest_total_hits_as_int'] = (boolean) If true, hits.total are rendered as an integer in the response. (Default = false)
$params['routing'] = (any) Custom value used to route operations to a specific shard.
$params['scroll'] = (string) Specifies how long a consistent view of the indexshould be maintained for scrolled search.
$params['search_type'] = (enum) The type of the search operation. (Options = dfs_query_then_fetch,query_then_fetch)
$params['typed_keys'] = (boolean) If true , the response prefixes aggregation and suggester names with their respective types.
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
$params['body'] = (array) The search definition template and its params (Required)
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
termvectors(array $params = []): array
Returns information and statistics about terms in the fields of a particular document.
Returns information and statistics about terms in the fields of a particular document.
$params['index'] = (string) Name of the index that contains the document. (Required)
$params['id'] = (string) Unique identifier of the document.
$params['field_statistics'] = (boolean) If true , the response includes the document count, sum of document frequencies, and sum of total term frequencies. (Default = true)
$params['fields'] = (any) Comma-separated list or wildcard expressions of fields to include in the statistics.Used as the default list unless a specific field list is provided in the completion_fields or fielddata_fields parameters.
$params['offsets'] = (boolean) If true , the response includes term offsets. (Default = true)
$params['payloads'] = (boolean) If true , the response includes term payloads. (Default = true)
$params['positions'] = (boolean) If true , the response includes term positions. (Default = true)
$params['preference'] = (string) Specifies the node or shard the operation should be performed on.Random by default. (Default = random)
$params['realtime'] = (boolean) If true, the request is real-time as opposed to near-real-time. (Default = true)
$params['routing'] = (any) Custom value used to route operations to a specific shard.
$params['term_statistics'] = (boolean) If true , the response includes term frequency and document frequency. (Default = false)
$params['version'] = (integer) If true , returns the document version as part of a hit.
$params['version_type'] = (enum) Specific version type. (Options = external,external_gte,force,internal)
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
$params['body'] = (array) Define parameters and or supply a document to get termvectors for. See documentation.
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
update(array $params = []): array
Updates a document with a script or partial document.
Updates a document with a script or partial document.
$params['id'] = (string) Document ID (Required)
$params['index'] = (string) The name of the index (Required)
$params['_source'] = (any) Set to false to disable source retrieval. You can also specify a comma-separatedlist of the fields you want to retrieve.
$params['_source_excludes'] = (any) Specify the source fields you want to exclude.
$params['_source_includes'] = (any) Specify the source fields you want to retrieve.
$params['if_primary_term'] = (integer) Only perform the operation if the document has this primary term.
$params['if_seq_no'] = (integer) Only perform the operation if the document has this sequence number.
$params['lang'] = (string) The script language. (Default = painless)
$params['refresh'] = (enum) If 'true', OpenSearch refreshes the affected shards to make this operationvisible to search, if 'wait_for' then wait for a refresh to make this operationvisible to search, if 'false' do nothing with refreshes. (Options = false,true,wait_for)
$params['require_alias'] = (boolean) If true, the destination must be an index alias. (Default = false)
$params['retry_on_conflict'] = (integer) Specify how many times should the operation be retried when a conflict occurs. (Default = 0)
$params['routing'] = (any) Custom value used to route operations to a specific shard.
$params['timeout'] = (string) Period to wait for dynamic mapping updates and active shards.This guarantees OpenSearch waits for at least the timeout before failing.The actual wait time could be longer, particularly when multiple waits occur.
$params['wait_for_active_shards'] = (any) The number of shard copies that must be active before proceeding with the operations.Set to 'all' or any positive integer up to the total number of shards in the index(number_of_replicas+1). Defaults to 1 meaning the primary shard.
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
$params['body'] = (array) The request definition requires either script or partial doc (Required)
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
updateByQuery(array $params = []): array
Performs an update on every document in the index without changing the source,for example to pick up a mapping change.
Performs an update on every document in the index without changing the source,for example to pick up a mapping change.
$params['index'] = (array) 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 . (Required)
$params['_source'] = (array) True or false to return the _source field or not, or a list of fields to return.
$params['_source_excludes'] = (array) List of fields to exclude from the returned _source field.
$params['_source_includes'] = (array) List of fields to extract and return from the _source field.
$params['allow_no_indices'] = (boolean) 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 .
$params['analyze_wildcard'] = (boolean) If true , wildcard and prefix queries are analyzed. (Default = false)
$params['analyzer'] = (string) Analyzer to use for the query string.
$params['conflicts'] = (enum) What to do if update by query hits version conflicts: abort or proceed . (Options = abort,proceed)
$params['default_operator'] = (enum) The default operator for query string query: AND or OR . (Options = and,or)
$params['df'] = (string) Field to use as default where no field prefix is given in the query string.
$params['expand_wildcards'] = (any) 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 .Valid values are: all , open , closed , hidden , none .
$params['from'] = (integer) Starting offset. (Default = 0)
$params['ignore_unavailable'] = (boolean) If false , the request returns an error if it targets a missing or closed index.
$params['lenient'] = (boolean) If true , format-based query failures (such as providing text to a numeric field) in the query string will be ignored.
$params['max_docs'] = (integer) Maximum number of documents to process.Defaults to all documents.
$params['pipeline'] = (string) 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.
$params['preference'] = (string) Specifies the node or shard the operation should be performed on.Random by default. (Default = random)
$params['q'] = (string) Query in the Lucene query string syntax.
$params['refresh'] = (boolean) If true , OpenSearch refreshes affected shards to make the operation visible to search.
$params['request_cache'] = (boolean) If true , the request cache is used for this request.
$params['requests_per_second'] = (number) The throttle for this request in sub-requests per second. (Default = 0)
$params['routing'] = (any) Custom value used to route operations to a specific shard.
$params['scroll'] = (string) Period to retain the search context for scrolling.
$params['scroll_size'] = (integer) Size of the scroll request that powers the operation. (Default = 100)
$params['search_timeout'] = (string) Explicit timeout for each search request.
$params['search_type'] = (enum) The type of the search operation. Available options: query_then_fetch , dfs_query_then_fetch . (Options = dfs_query_then_fetch,query_then_fetch)
$params['size'] = (integer) Deprecated, please use max_docs instead.
$params['slices'] = (any) The number of slices this task should be divided into.
$params['sort'] = (array) A comma-separated list of : pairs.
$params['stats'] = (array) Specific tag of the request for logging and statistical purposes.
$params['terminate_after'] = (integer) 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.
$params['timeout'] = (string) Period each update request waits for the following operations: dynamic mapping updates, waiting for active shards.
$params['version'] = (boolean) If true , returns the document version as part of a hit.
$params['wait_for_active_shards'] = (any) 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 ).
$params['wait_for_completion'] = (boolean) If true , the request blocks until the operation is complete. (Default = true)
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
$params['body'] = (array) The search definition using the Query DSL
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
updateByQueryRethrottle(array $params = []): array
Changes the number of requests per second for a particular Update By Query operation.
Changes the number of requests per second for a particular Update By Query operation.
$params['task_id'] = (string) The ID for the task. (Required)
$params['requests_per_second'] = (number) The throttle for this request in sub-requests per second.
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
$params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
createPointInTime(array $params = [])
Proxy function to createPointInTime() to prevent BC break.
This API will be removed in a future version. Use 'createPit…
Proxy function to createPointInTime() to prevent BC break.
This API will be removed in a future version. Use 'createPit' API instead.
|
#
|
public
|
create(array $params = []): array
Creates a new document in the index.Returns a 409 response when a document with a same ID already exists in the index.
Creates a new document in the index.Returns a 409 response when a document with a same ID already exists in the index.
$params['id'] = (string) Unique identifier for the document. (Required)
$params['index'] = (string) Name of the data stream or index to target. If the target doesn’t exist and matches the name or wildcard (* ) pattern of an index template with a data_stream definition, this request creates the data stream. If the target doesn’t exist and doesn’t match a data stream template, this request creates the index. (Required)
$params['pipeline'] = (string) 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.
$params['refresh'] = (enum) 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 . (Options = true,false,wait_for)
$params['routing'] = (string) Custom value used to route operations to a specific shard.
$params['timeout'] = (string) Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
$params['version'] = (number) Explicit version number for concurrency control.The specified version must match the current version of the document for the request to succeed.
$params['version_type'] = (enum) Specific version type: external , external_gte . (Options = internal,external,external_gte,force)
$params['wait_for_active_shards'] = (any) 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 ).
$params['pretty'] = (boolean) Whether to pretty format the returned JSON response.
$params['human'] = (boolean) Whether to return human readable values for statistics.
$params['error_trace'] = (boolean) Whether to include the stack trace of returned errors.
$params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
$params['filter_path'] = (any) Comma-separated list of filters used to reduce the response.
$params['body'] = (array) The document (Required)
Parameters
$params |
Associative array of parameters
|
|
#
|
public
|
deletePointInTime(array $params = [])
Proxy function to deletePointInTime() to prevent BC break.
This API will be removed in a future version. Use 'deletePit…
Proxy function to deletePointInTime() to prevent BC break.
This API will be removed in a future version. Use 'deletePit' API instead.
|
#
|
public
|
asyncSearch(): AsyncSearchNamespace
Returns the asyncSearch namespace
Returns the asyncSearch namespace
|
#
|
public
|
asynchronousSearch(): AsynchronousSearchNamespace
Returns the asynchronousSearch namespace
Returns the asynchronousSearch namespace
|
#
|
public
|
cat(): CatNamespace
Returns the cat namespace
Returns the cat namespace
|
#
|
public
|
cluster(): ClusterNamespace
Returns the cluster namespace
Returns the cluster namespace
|
#
|
public
|
danglingIndices(): DanglingIndicesNamespace
Returns the danglingIndices namespace
Returns the danglingIndices namespace
|
#
|
public
|
dataFrameTransformDeprecated(): DataFrameTransformDeprecatedNamespace
Returns the dataFrameTransformDeprecated namespace
Returns the dataFrameTransformDeprecated namespace
|
#
|
public
|
flowFramework(): FlowFrameworkNamespace
Returns the flowFramework namespace
Returns the flowFramework namespace
|
#
|
public
|
indices(): IndicesNamespace
Returns the indices namespace
Returns the indices namespace
|
#
|
public
|
ingest(): IngestNamespace
Returns the ingest namespace
Returns the ingest namespace
|
#
|
public
|
insights(): InsightsNamespace
Returns the insights namespace
Returns the insights namespace
|
#
|
public
|
ism(): IsmNamespace
Returns the ism namespace
Returns the ism namespace
|
#
|
public
|
knn(): KnnNamespace
Returns the knn namespace
Returns the knn namespace
|
#
|
public
|
list(): ListNamespace
Returns the list namespace
Returns the list namespace
|
#
|
public
|
ml(): MlNamespace
Returns the ml namespace
|
#
|
public
|
monitoring(): MonitoringNamespace
Returns the monitoring namespace
Returns the monitoring namespace
|
#
|
public
|
nodes(): NodesNamespace
Returns the nodes namespace
Returns the nodes namespace
|
#
|
public
|
notifications(): NotificationsNamespace
Returns the notifications namespace
Returns the notifications namespace
|
#
|
public
|
observability(): ObservabilityNamespace
Returns the observability namespace
Returns the observability namespace
|
#
|
public
|
ppl(): PplNamespace
Returns the ppl namespace
Returns the ppl namespace
|
#
|
public
|
query(): QueryNamespace
Returns the query namespace
Returns the query namespace
|
#
|
public
|
remoteStore(): RemoteStoreNamespace
Returns the remoteStore namespace
Returns the remoteStore namespace
|
#
|
public
|
rollups(): RollupsNamespace
Returns the rollups namespace
Returns the rollups namespace
|
#
|
public
|
searchPipeline(): SearchPipelineNamespace
Returns the searchPipeline namespace
Returns the searchPipeline namespace
|
#
|
public
|
searchableSnapshots(): SearchableSnapshotsNamespace
Returns the searchableSnapshots namespace
Returns the searchableSnapshots namespace
|
#
|
public
|
security(): SecurityNamespace
Returns the security namespace
Returns the security namespace
|
#
|
public
|
snapshot(): SnapshotNamespace
Returns the snapshot namespace
Returns the snapshot namespace
|
#
|
public
|
sql(): SqlNamespace
Returns the sql namespace
Returns the sql namespace
|
#
|
public
|
ssl(): SslNamespace
Returns the ssl namespace
Returns the ssl namespace
|
#
|
public
|
tasks(): TasksNamespace
Returns the tasks namespace
Returns the tasks namespace
|
#
|
public
|
transforms(): TransformsNamespace
Returns the transforms namespace
Returns the transforms namespace
|
#
|
public
|
wlm(): WlmNamespace
Returns the wlm namespace
Returns the wlm namespace
|
#
|
protected
|
getEndpointFactory(): EndpointFactoryInterface
Gets the endpoint factory.
Gets the endpoint factory.
|
#
|
public
|
__call(string $name, array $arguments): object
Catchall for registered namespaces
Catchall for registered namespaces
Throws
|
#
|
public
|
extractArgument(array &$params, string $arg): null|mixed
Extract an argument from the array of parameters
Extract an argument from the array of parameters
|
#
|
public
|
request(string $method, string $uri, array $attributes = []): callable|array
Sends a raw request to the cluster
Sends a raw request to the cluster
Throws
|
#
|