NAME
OpenSearch::Client::Core::3_0::Direct
VERSION
version 3.007004
SYNOPSIS
use OpenSearch::Client;
my $client = OpenSearch::Client->new( ... );
my $response = $client->search(
index => 'my_index',
body => $body_hash_ref
);
DESCRIPTION
Provides the top level methods for OpenSearch::Client, such as
$client->search( 'index' => 'my_index', 'body' => $searchdef )$client->create( 'index' => 'an_index', 'body' => $indexdef )
See OpenSearch documentation for $client].
METHODS
bulk
Allows to perform multiple index/update/delete operations in a single request.
Paths served by this method:
$resp = $client->bulk(
'body' => $body, # required
# path parameters
'index' => $index, # optional
# Endpoint specific query string parameters
'_source' => $qval1, # list
'_source_excludes' => $qval2, # list
'_source_includes' => $qval3, # list
'index' => $qval4, # string
'pipeline' => $qval5, # string
'refresh' => $qval6, # boolean|string
'require_alias' => $qval7, # boolean
'routing' => $qval8, # string
'timeout' => $qval9, # string
'type' => $qval10, # string
'wait_for_active_shards' => $qval11, # string
# Common API query string parameters
'error_trace' => $qval12, # boolean
'filter_path' => $qval13, # list
'human' => $qval14, # boolean
'pretty' => $qval15, # boolean
'source' => $qval16, # string
);
OpenSearch documentation for $client->bulk
bulk_stream
Allows to perform multiple index/update/delete operations using request response streaming.
Paths served by this method:
$resp = $client->bulk_stream(
'body' => $body, # required
# path parameters
'index' => $index, # optional
# Endpoint specific query string parameters
'_source' => $qval1, # list
'_source_excludes' => $qval2, # list
'_source_includes' => $qval3, # list
'batch_interval' => $qval4, # string
'batch_size' => $qval5, # number
'pipeline' => $qval6, # string
'refresh' => $qval7, # boolean|string
'require_alias' => $qval8, # boolean
'routing' => $qval9, # list
'timeout' => $qval10, # string
'type' => $qval11, # string
'wait_for_active_shards' => $qval12, # string
# Common API query string parameters
'error_trace' => $qval13, # boolean
'filter_path' => $qval14, # list
'human' => $qval15, # boolean
'pretty' => $qval16, # boolean
'source' => $qval17, # string
);
OpenSearch documentation for $client->bulk_stream
clear_scroll
Explicitly clears the search context for a scroll.
Paths served by this method:
$resp = $client->clear_scroll(
'body' => $body, # optional
# path parameters
'scroll_id' => $scroll_id, # optional
# Common API query string parameters
'error_trace' => $qval1, # boolean
'filter_path' => $qval2, # list
'human' => $qval3, # boolean
'pretty' => $qval4, # boolean
'source' => $qval5, # string
);
OpenSearch documentation for $client->clear_scroll
count
Returns number of documents matching a query.
Paths served by this method:
$resp = $client->count(
'body' => $body, # optional
# path parameters
'index' => $index, # optional
# Endpoint specific query string parameters
'allow_no_indices' => $qval1, # boolean
'analyze_wildcard' => $qval2, # boolean
'analyzer' => $qval3, # string
'default_operator' => $qval4, # string
'df' => $qval5, # string
'expand_wildcards' => $qval6, # list
'ignore_throttled' => $qval7, # boolean
'ignore_unavailable' => $qval8, # boolean
'lenient' => $qval9, # boolean
'min_score' => $qval10, # number
'preference' => $qval11, # string
'q' => $qval12, # string
'routing' => $qval13, # list
'terminate_after' => $qval14, # number
# Common API query string parameters
'error_trace' => $qval15, # boolean
'filter_path' => $qval16, # list
'human' => $qval17, # boolean
'pretty' => $qval18, # boolean
'source' => $qval19, # string
);
OpenSearch documentation for $client->count
create
Creates a new document in the index.
Returns a 409 response when a document with a same ID already exists in the index.
Paths served by this method:
$resp = $client->create(
'body' => $body, # required
# path parameters
'id' => $id, # required
'index' => $index, # required
# Endpoint specific query string parameters
'pipeline' => $qval1, # string
'refresh' => $qval2, # boolean|string
'routing' => $qval3, # list
'timeout' => $qval4, # string
'version' => $qval5, # number
'version_type' => $qval6, # string
'wait_for_active_shards' => $qval7, # string
# Common API query string parameters
'error_trace' => $qval8, # boolean
'filter_path' => $qval9, # list
'human' => $qval10, # boolean
'pretty' => $qval11, # boolean
'source' => $qval12, # string
);
OpenSearch documentation for $client->create
create_pit
Creates point in time context.
Paths served by this method:
$resp = $client->create_pit(
# path parameters
'index' => $index, # required
# Endpoint specific query string parameters
'allow_partial_pit_creation' => $qval1, # boolean
'expand_wildcards' => $qval2, # list
'keep_alive' => $qval3, # string
'preference' => $qval4, # string
'routing' => $qval5, # list
# Common API query string parameters
'error_trace' => $qval6, # boolean
'filter_path' => $qval7, # list
'human' => $qval8, # boolean
'pretty' => $qval9, # boolean
'source' => $qval10, # string
);
OpenSearch documentation for $client->create_pit
delete
Removes a document from the index.
Paths served by this method:
$resp = $client->delete(
# path parameters
'id' => $id, # required
'index' => $index, # required
# Endpoint specific query string parameters
'if_primary_term' => $qval1, # number
'if_seq_no' => $qval2, # number
'refresh' => $qval3, # boolean|string
'routing' => $qval4, # list
'timeout' => $qval5, # string
'version' => $qval6, # number
'version_type' => $qval7, # string
'wait_for_active_shards' => $qval8, # string
# Common API query string parameters
'error_trace' => $qval9, # boolean
'filter_path' => $qval10, # list
'human' => $qval11, # boolean
'pretty' => $qval12, # boolean
'source' => $qval13, # string
);
OpenSearch documentation for $client->delete
delete_all_pits
Deletes all active point in time searches.
Paths served by this method:
$resp = $client->delete_all_pits(
# Common API query string parameters
'error_trace' => $qval1, # boolean
'filter_path' => $qval2, # list
'human' => $qval3, # boolean
'pretty' => $qval4, # boolean
'source' => $qval5, # string
);
OpenSearch documentation for $client->delete_all_pits
delete_by_query
Deletes documents matching the provided query.
Paths served by this method:
$resp = $client->delete_by_query(
'body' => $body, # optional
# path parameters
'index' => $index, # required
# Endpoint specific query string parameters
'_source' => $qval1, # list
'_source_excludes' => $qval2, # list
'_source_includes' => $qval3, # list
'allow_no_indices' => $qval4, # boolean
'analyze_wildcard' => $qval5, # boolean
'analyzer' => $qval6, # string
'conflicts' => $qval7, # string
'default_operator' => $qval8, # string
'df' => $qval9, # string
'expand_wildcards' => $qval10, # list
'from' => $qval11, # number
'ignore_unavailable' => $qval12, # boolean
'lenient' => $qval13, # boolean
'max_docs' => $qval14, # number
'preference' => $qval15, # string
'q' => $qval16, # string
'refresh' => $qval17, # boolean|string
'request_cache' => $qval18, # boolean
'requests_per_second' => $qval19, # number
'routing' => $qval20, # list
'scroll' => $qval21, # string
'scroll_size' => $qval22, # number
'search_timeout' => $qval23, # string
'search_type' => $qval24, # string
'size' => $qval25, # number
'slices' => $qval26, # number|string
'sort' => $qval27, # list
'stats' => $qval28, # list
'terminate_after' => $qval29, # number
'timeout' => $qval30, # string
'version' => $qval31, # boolean
'wait_for_active_shards' => $qval32, # string
'wait_for_completion' => $qval33, # boolean
# Common API query string parameters
'error_trace' => $qval34, # boolean
'filter_path' => $qval35, # list
'human' => $qval36, # boolean
'pretty' => $qval37, # boolean
'source' => $qval38, # string
);
OpenSearch documentation for $client->delete_by_query
delete_by_query_rethrottle
Changes the number of requests per second for a particular Delete By Query operation.
Paths served by this method:
$resp = $client->delete_by_query_rethrottle(
# path parameters
'task_id' => $task_id, # required
# Endpoint specific query string parameters
'requests_per_second' => $qval1, # number
# Common API query string parameters
'error_trace' => $qval2, # boolean
'filter_path' => $qval3, # list
'human' => $qval4, # boolean
'pretty' => $qval5, # boolean
'source' => $qval6, # string
);
OpenSearch documentation for $client->delete_by_query_rethrottle
delete_pit
Deletes one or more point in time searches based on the IDs passed.
Paths served by this method:
$resp = $client->delete_pit(
'body' => $body, # optional
# Common API query string parameters
'error_trace' => $qval1, # boolean
'filter_path' => $qval2, # list
'human' => $qval3, # boolean
'pretty' => $qval4, # boolean
'source' => $qval5, # string
);
OpenSearch documentation for $client->delete_pit
delete_script
Deletes a script.
Paths served by this method:
$resp = $client->delete_script(
# path parameters
'id' => $id, # required
# Endpoint specific query string parameters
'cluster_manager_timeout' => $qval1, # string
'master_timeout' => $qval2, # string
'timeout' => $qval3, # string
# Common API query string parameters
'error_trace' => $qval4, # boolean
'filter_path' => $qval5, # list
'human' => $qval6, # boolean
'pretty' => $qval7, # boolean
'source' => $qval8, # string
);
OpenSearch documentation for $client->delete_script
exists
Returns information about whether a document exists in an index.
Paths served by this method:
$resp = $client->exists(
# path parameters
'id' => $id, # required
'index' => $index, # required
# Endpoint specific query string parameters
'_source' => $qval1, # list
'_source_excludes' => $qval2, # list
'_source_includes' => $qval3, # list
'preference' => $qval4, # string
'realtime' => $qval5, # boolean
'refresh' => $qval6, # boolean|string
'routing' => $qval7, # list
'stored_fields' => $qval8, # list
'version' => $qval9, # number
'version_type' => $qval10, # string
# Common API query string parameters
'error_trace' => $qval11, # boolean
'filter_path' => $qval12, # list
'human' => $qval13, # boolean
'pretty' => $qval14, # boolean
'source' => $qval15, # string
);
OpenSearch documentation for $client->exists
exists_source
Returns information about whether a document source exists in an index.
Paths served by this method:
$resp = $client->exists_source(
# path parameters
'id' => $id, # required
'index' => $index, # required
# Endpoint specific query string parameters
'_source' => $qval1, # list
'_source_excludes' => $qval2, # list
'_source_includes' => $qval3, # list
'preference' => $qval4, # string
'realtime' => $qval5, # boolean
'refresh' => $qval6, # boolean|string
'routing' => $qval7, # list
'version' => $qval8, # number
'version_type' => $qval9, # string
# Common API query string parameters
'error_trace' => $qval10, # boolean
'filter_path' => $qval11, # list
'human' => $qval12, # boolean
'pretty' => $qval13, # boolean
'source' => $qval14, # string
);
OpenSearch documentation for $client->exists_source
explain
Returns information about why a specific document matches (or doesn't match) a query.
Paths served by this method:
$resp = $client->explain(
'body' => $body, # optional
# path parameters
'id' => $id, # required
'index' => $index, # required
# Endpoint specific query string parameters
'_source' => $qval1, # list
'_source_excludes' => $qval2, # list
'_source_includes' => $qval3, # list
'analyze_wildcard' => $qval4, # boolean
'analyzer' => $qval5, # string
'default_operator' => $qval6, # string
'df' => $qval7, # string
'lenient' => $qval8, # boolean
'preference' => $qval9, # string
'q' => $qval10, # string
'routing' => $qval11, # list
'stored_fields' => $qval12, # list
# Common API query string parameters
'error_trace' => $qval13, # boolean
'filter_path' => $qval14, # list
'human' => $qval15, # boolean
'pretty' => $qval16, # boolean
'source' => $qval17, # string
);
OpenSearch documentation for $client->explain
field_caps
Returns the information about the capabilities of fields among multiple indexes.
Paths served by this method:
$resp = $client->field_caps(
'body' => $body, # optional
# path parameters
'index' => $index, # optional
# Endpoint specific query string parameters
'allow_no_indices' => $qval1, # boolean
'expand_wildcards' => $qval2, # list
'fields' => $qval3, # list
'ignore_unavailable' => $qval4, # boolean
'include_unmapped' => $qval5, # boolean
# Common API query string parameters
'error_trace' => $qval6, # boolean
'filter_path' => $qval7, # list
'human' => $qval8, # boolean
'pretty' => $qval9, # boolean
'source' => $qval10, # string
);
OpenSearch documentation for $client->field_caps
get
Returns a document.
Paths served by this method:
$resp = $client->get(
# path parameters
'id' => $id, # required
'index' => $index, # required
# Endpoint specific query string parameters
'_source' => $qval1, # list
'_source_excludes' => $qval2, # list
'_source_includes' => $qval3, # list
'preference' => $qval4, # string
'realtime' => $qval5, # boolean
'refresh' => $qval6, # boolean|string
'routing' => $qval7, # list
'stored_fields' => $qval8, # list
'version' => $qval9, # number
'version_type' => $qval10, # string
# Common API query string parameters
'error_trace' => $qval11, # boolean
'filter_path' => $qval12, # list
'human' => $qval13, # boolean
'pretty' => $qval14, # boolean
'source' => $qval15, # string
);
OpenSearch documentation for $client->get
get_all_pits
Lists all active point in time searches.
Paths served by this method:
$resp = $client->get_all_pits(
# Common API query string parameters
'error_trace' => $qval1, # boolean
'filter_path' => $qval2, # list
'human' => $qval3, # boolean
'pretty' => $qval4, # boolean
'source' => $qval5, # string
);
OpenSearch documentation for $client->get_all_pits
get_script
Returns a script.
Paths served by this method:
$resp = $client->get_script(
# path parameters
'id' => $id, # required
# Endpoint specific query string parameters
'cluster_manager_timeout' => $qval1, # string
'master_timeout' => $qval2, # string
# Common API query string parameters
'error_trace' => $qval3, # boolean
'filter_path' => $qval4, # list
'human' => $qval5, # boolean
'pretty' => $qval6, # boolean
'source' => $qval7, # string
);
OpenSearch documentation for $client->get_script
get_script_context
Returns all script contexts.
Paths served by this method:
$resp = $client->get_script_context(
# Common API query string parameters
'error_trace' => $qval1, # boolean
'filter_path' => $qval2, # list
'human' => $qval3, # boolean
'pretty' => $qval4, # boolean
'source' => $qval5, # string
);
OpenSearch documentation for $client->get_script_context
get_script_languages
Returns available script types, languages and contexts.
Paths served by this method:
$resp = $client->get_script_languages(
# Common API query string parameters
'error_trace' => $qval1, # boolean
'filter_path' => $qval2, # list
'human' => $qval3, # boolean
'pretty' => $qval4, # boolean
'source' => $qval5, # string
);
OpenSearch documentation for $client->get_script_languages
get_source
Returns the source of a document.
Paths served by this method:
$resp = $client->get_source(
# path parameters
'id' => $id, # required
'index' => $index, # required
# Endpoint specific query string parameters
'_source' => $qval1, # list
'_source_excludes' => $qval2, # list
'_source_includes' => $qval3, # list
'preference' => $qval4, # string
'realtime' => $qval5, # boolean
'refresh' => $qval6, # boolean|string
'routing' => $qval7, # list
'version' => $qval8, # number
'version_type' => $qval9, # string
# Common API query string parameters
'error_trace' => $qval10, # boolean
'filter_path' => $qval11, # list
'human' => $qval12, # boolean
'pretty' => $qval13, # boolean
'source' => $qval14, # string
);
OpenSearch documentation for $client->get_source
index
Creates or updates a document in an index.
Paths served by this method:
$resp = $client->index(
'body' => $body, # optional
# path parameters
'id' => $id, # optional
'index' => $index, # required
# Endpoint specific query string parameters
'if_primary_term' => $qval1, # number
'if_seq_no' => $qval2, # number
'op_type' => $qval3, # string
'pipeline' => $qval4, # string
'refresh' => $qval5, # boolean|string
'require_alias' => $qval6, # boolean
'routing' => $qval7, # list
'timeout' => $qval8, # string
'version' => $qval9, # number
'version_type' => $qval10, # string
'wait_for_active_shards' => $qval11, # string
# Common API query string parameters
'error_trace' => $qval12, # boolean
'filter_path' => $qval13, # list
'human' => $qval14, # boolean
'pretty' => $qval15, # boolean
'source' => $qval16, # string
);
OpenSearch documentation for $client->index
info
Returns basic information about the cluster.
Paths served by this method:
$resp = $client->info();
OpenSearch documentation for $client->info
mget
Allows to get multiple documents in one request.
Paths served by this method:
$resp = $client->mget(
'body' => $body, # required
# path parameters
'index' => $index, # optional
# Endpoint specific query string parameters
'_source' => $qval1, # list
'_source_excludes' => $qval2, # list
'_source_includes' => $qval3, # list
'preference' => $qval4, # string
'realtime' => $qval5, # boolean
'refresh' => $qval6, # boolean|string
'routing' => $qval7, # list
'stored_fields' => $qval8, # list
# Common API query string parameters
'error_trace' => $qval9, # boolean
'filter_path' => $qval10, # list
'human' => $qval11, # boolean
'pretty' => $qval12, # boolean
'source' => $qval13, # string
);
OpenSearch documentation for $client->mget
msearch
Allows to execute several search operations in one request.
Paths served by this method:
$resp = $client->msearch(
'body' => $body, # required
# path parameters
'index' => $index, # optional
# Endpoint specific query string parameters
'allow_partial_results' => $qval1, # boolean
'ccs_minimize_roundtrips' => $qval2, # boolean
'max_concurrent_searches' => $qval3, # number
'max_concurrent_shard_requests' => $qval4, # number
'pre_filter_shard_size' => $qval5, # number
'rest_total_hits_as_int' => $qval6, # boolean
'search_type' => $qval7, # string
'typed_keys' => $qval8, # boolean
# Common API query string parameters
'error_trace' => $qval9, # boolean
'filter_path' => $qval10, # list
'human' => $qval11, # boolean
'pretty' => $qval12, # boolean
'source' => $qval13, # string
);
OpenSearch documentation for $client->msearch
msearch_template
Allows to execute several search template operations in one request.
Paths served by this method:
GET /_msearch/templateGET /{index}/_msearch/templatePOST /_msearch/templatePOST /{index}/_msearch/template
$resp = $client->msearch_template(
'body' => $body, # required
# path parameters
'index' => $index, # optional
# Endpoint specific query string parameters
'ccs_minimize_roundtrips' => $qval1, # boolean
'max_concurrent_searches' => $qval2, # number
'rest_total_hits_as_int' => $qval3, # boolean
'search_type' => $qval4, # string
'typed_keys' => $qval5, # boolean
# Common API query string parameters
'error_trace' => $qval6, # boolean
'filter_path' => $qval7, # list
'human' => $qval8, # boolean
'pretty' => $qval9, # boolean
'source' => $qval10, # string
);
OpenSearch documentation for $client->msearch_template
mtermvectors
Returns multiple termvectors in one request.
Paths served by this method:
$resp = $client->mtermvectors(
'body' => $body, # optional
# path parameters
'index' => $index, # optional
# Endpoint specific query string parameters
'field_statistics' => $qval1, # boolean
'fields' => $qval2, # list
'ids' => $qval3, # list
'offsets' => $qval4, # boolean
'payloads' => $qval5, # boolean
'positions' => $qval6, # boolean
'preference' => $qval7, # string
'realtime' => $qval8, # boolean
'routing' => $qval9, # list
'term_statistics' => $qval10, # boolean
'version' => $qval11, # number
'version_type' => $qval12, # string
# Common API query string parameters
'error_trace' => $qval13, # boolean
'filter_path' => $qval14, # list
'human' => $qval15, # boolean
'pretty' => $qval16, # boolean
'source' => $qval17, # string
);
OpenSearch documentation for $client->mtermvectors
ping
Returns whether the cluster is running.
Paths served by this method:
$resp = $client->ping(
# Common API query string parameters
'error_trace' => $qval1, # boolean
'filter_path' => $qval2, # list
'human' => $qval3, # boolean
'pretty' => $qval4, # boolean
'source' => $qval5, # string
);
OpenSearch documentation for $client->ping
put_script
Creates or updates a script.
Paths served by this method:
$resp = $client->put_script(
'body' => $body, # required
# path parameters
'context' => $context, # optional
'id' => $id, # required
# Endpoint specific query string parameters
'cluster_manager_timeout' => $qval1, # string
'context' => $qval2, # string
'master_timeout' => $qval3, # string
'timeout' => $qval4, # string
# Common API query string parameters
'error_trace' => $qval5, # boolean
'filter_path' => $qval6, # list
'human' => $qval7, # boolean
'pretty' => $qval8, # boolean
'source' => $qval9, # string
);
OpenSearch documentation for $client->put_script
rank_eval
Allows to evaluate the quality of ranked search results over a set of typical search queries.
Paths served by this method:
$resp = $client->rank_eval(
'body' => $body, # required
# path parameters
'index' => $index, # optional
# Endpoint specific query string parameters
'allow_no_indices' => $qval1, # boolean
'expand_wildcards' => $qval2, # list
'ignore_unavailable' => $qval3, # boolean
'search_type' => $qval4, # string
# Common API query string parameters
'error_trace' => $qval5, # boolean
'filter_path' => $qval6, # list
'human' => $qval7, # boolean
'pretty' => $qval8, # boolean
'source' => $qval9, # string
);
OpenSearch documentation for $client->rank_eval
reindex
Allows to copy documents from one index to another, optionally filtering the source documents by a query, changing the destination index settings, or fetching the documents from a remote cluster.
Paths served by this method:
$resp = $client->reindex(
'body' => $body, # optional
# Endpoint specific query string parameters
'max_docs' => $qval1, # number
'refresh' => $qval2, # boolean|string
'requests_per_second' => $qval3, # number
'require_alias' => $qval4, # boolean
'scroll' => $qval5, # string
'slices' => $qval6, # number|string
'timeout' => $qval7, # string
'wait_for_active_shards' => $qval8, # string
'wait_for_completion' => $qval9, # boolean
# Common API query string parameters
'error_trace' => $qval10, # boolean
'filter_path' => $qval11, # list
'human' => $qval12, # boolean
'pretty' => $qval13, # boolean
'source' => $qval14, # string
);
OpenSearch documentation for $client->reindex
reindex_rethrottle
Changes the number of requests per second for a particular reindex operation.
Paths served by this method:
$resp = $client->reindex_rethrottle(
# path parameters
'task_id' => $task_id, # required
# Endpoint specific query string parameters
'requests_per_second' => $qval1, # number
# Common API query string parameters
'error_trace' => $qval2, # boolean
'filter_path' => $qval3, # list
'human' => $qval4, # boolean
'pretty' => $qval5, # boolean
'source' => $qval6, # string
);
OpenSearch documentation for $client->reindex_rethrottle
render_search_template
Allows to use the Mustache language to pre-render a search definition.
Paths served by this method:
$resp = $client->render_search_template(
'body' => $body, # optional
# path parameters
'id' => $id, # optional
# Common API query string parameters
'error_trace' => $qval1, # boolean
'filter_path' => $qval2, # list
'human' => $qval3, # boolean
'pretty' => $qval4, # boolean
'source' => $qval5, # string
);
OpenSearch documentation for $client->render_search_template
scripts_painless_execute
Allows an arbitrary script to be executed and a result to be returned.
Paths served by this method:
$resp = $client->scripts_painless_execute(
'body' => $body, # optional
# Common API query string parameters
'error_trace' => $qval1, # boolean
'filter_path' => $qval2, # list
'human' => $qval3, # boolean
'pretty' => $qval4, # boolean
'source' => $qval5, # string
);
OpenSearch documentation for $client->scripts_painless_execute
scroll
Allows to retrieve a large numbers of results from a single search request.
Paths served by this method:
GET /_search/scrollGET /_search/scroll/{scroll_id}POST /_search/scrollPOST /_search/scroll/{scroll_id}
$resp = $client->scroll(
'body' => $body, # optional
# path parameters
'scroll_id' => $scroll_id, # optional
# Endpoint specific query string parameters
'rest_total_hits_as_int' => $qval1, # boolean
'scroll' => $qval2, # string
'scroll_id' => $qval3, # string
# Common API query string parameters
'error_trace' => $qval4, # boolean
'filter_path' => $qval5, # list
'human' => $qval6, # boolean
'pretty' => $qval7, # boolean
'source' => $qval8, # string
);
OpenSearch documentation for $client->scroll
search
Returns results matching a query.
Paths served by this method:
$resp = $client->search(
'body' => $body, # optional
# path parameters
'index' => $index, # optional
# Endpoint specific query string parameters
'_source' => $qval1, # list
'_source_excludes' => $qval2, # list
'_source_includes' => $qval3, # list
'allow_no_indices' => $qval4, # boolean
'allow_partial_search_results' => $qval5, # boolean
'analyze_wildcard' => $qval6, # boolean
'analyzer' => $qval7, # string
'batched_reduce_size' => $qval8, # number
'cancel_after_time_interval' => $qval9, # string
'ccs_minimize_roundtrips' => $qval10, # boolean
'default_operator' => $qval11, # string
'df' => $qval12, # string
'docvalue_fields' => $qval13, # list
'expand_wildcards' => $qval14, # list
'explain' => $qval15, # boolean
'from' => $qval16, # number
'ignore_throttled' => $qval17, # boolean
'ignore_unavailable' => $qval18, # boolean
'include_named_queries_score' => $qval19, # boolean
'index' => $qval20, # list
'lenient' => $qval21, # boolean
'max_concurrent_shard_requests' => $qval22, # number
'phase_took' => $qval23, # boolean
'pre_filter_shard_size' => $qval24, # number
'preference' => $qval25, # string
'q' => $qval26, # string
'request_cache' => $qval27, # boolean
'rest_total_hits_as_int' => $qval28, # boolean
'routing' => $qval29, # list
'scroll' => $qval30, # string
'search_pipeline' => $qval31, # string
'search_type' => $qval32, # string
'seq_no_primary_term' => $qval33, # boolean
'size' => $qval34, # number
'sort' => $qval35, # list
'stats' => $qval36, # list
'stored_fields' => $qval37, # list
'suggest_field' => $qval38, # string
'suggest_mode' => $qval39, # string
'suggest_size' => $qval40, # number
'suggest_text' => $qval41, # string
'terminate_after' => $qval42, # number
'timeout' => $qval43, # string
'track_scores' => $qval44, # boolean
'track_total_hits' => $qval45, # boolean|number
'typed_keys' => $qval46, # boolean
'verbose_pipeline' => $qval47, # boolean
'version' => $qval48, # boolean
# Common API query string parameters
'error_trace' => $qval49, # boolean
'filter_path' => $qval50, # list
'human' => $qval51, # boolean
'pretty' => $qval52, # boolean
'source' => $qval53, # string
);
OpenSearch documentation for $client->search
search_shards
Returns information about the indexes and shards that a search request would be executed against.
Paths served by this method:
$resp = $client->search_shards(
'body' => $body, # optional
# path parameters
'index' => $index, # optional
# Endpoint specific query string parameters
'allow_no_indices' => $qval1, # boolean
'expand_wildcards' => $qval2, # list
'ignore_unavailable' => $qval3, # boolean
'local' => $qval4, # boolean
'preference' => $qval5, # string
'routing' => $qval6, # list
# Common API query string parameters
'error_trace' => $qval7, # boolean
'filter_path' => $qval8, # list
'human' => $qval9, # boolean
'pretty' => $qval10, # boolean
'source' => $qval11, # string
);
OpenSearch documentation for $client->search_shards
search_template
Allows to use the Mustache language to pre-render a search definition.
Paths served by this method:
GET /_search/templateGET /{index}/_search/templatePOST /_search/templatePOST /{index}/_search/template
$resp = $client->search_template(
'body' => $body, # required
# path parameters
'index' => $index, # optional
# Endpoint specific query string parameters
'allow_no_indices' => $qval1, # boolean
'ccs_minimize_roundtrips' => $qval2, # boolean
'expand_wildcards' => $qval3, # list
'explain' => $qval4, # boolean
'ignore_throttled' => $qval5, # boolean
'ignore_unavailable' => $qval6, # boolean
'phase_took' => $qval7, # boolean
'preference' => $qval8, # string
'profile' => $qval9, # boolean
'rest_total_hits_as_int' => $qval10, # boolean
'routing' => $qval11, # list
'scroll' => $qval12, # string
'search_pipeline' => $qval13, # string
'search_type' => $qval14, # string
'typed_keys' => $qval15, # boolean
# Common API query string parameters
'error_trace' => $qval16, # boolean
'filter_path' => $qval17, # list
'human' => $qval18, # boolean
'pretty' => $qval19, # boolean
'source' => $qval20, # string
);
OpenSearch documentation for $client->search_template
termvectors
Returns information and statistics about terms in the fields of a particular document.
Paths served by this method:
GET /{index}/_termvectorsGET /{index}/_termvectors/{id}POST /{index}/_termvectorsPOST /{index}/_termvectors/{id}
$resp = $client->termvectors(
'body' => $body, # optional
# path parameters
'id' => $id, # optional
'index' => $index, # required
# Endpoint specific query string parameters
'field_statistics' => $qval1, # boolean
'fields' => $qval2, # list
'offsets' => $qval3, # boolean
'payloads' => $qval4, # boolean
'positions' => $qval5, # boolean
'preference' => $qval6, # string
'realtime' => $qval7, # boolean
'routing' => $qval8, # list
'term_statistics' => $qval9, # boolean
'version' => $qval10, # number
'version_type' => $qval11, # string
# Common API query string parameters
'error_trace' => $qval12, # boolean
'filter_path' => $qval13, # list
'human' => $qval14, # boolean
'pretty' => $qval15, # boolean
'source' => $qval16, # string
);
OpenSearch documentation for $client->termvectors
update
Updates a document with a script or partial document.
Paths served by this method:
$resp = $client->update(
'body' => $body, # optional
# path parameters
'id' => $id, # required
'index' => $index, # required
# Endpoint specific query string parameters
'_source' => $qval1, # list
'_source_excludes' => $qval2, # list
'_source_includes' => $qval3, # list
'if_primary_term' => $qval4, # number
'if_seq_no' => $qval5, # number
'lang' => $qval6, # string
'refresh' => $qval7, # boolean|string
'require_alias' => $qval8, # boolean
'retry_on_conflict' => $qval9, # number
'routing' => $qval10, # list
'timeout' => $qval11, # string
'wait_for_active_shards' => $qval12, # string
# Common API query string parameters
'error_trace' => $qval13, # boolean
'filter_path' => $qval14, # list
'human' => $qval15, # boolean
'pretty' => $qval16, # boolean
'source' => $qval17, # string
);
OpenSearch documentation for $client->update
update_by_query
Performs an update on every document in the index without changing the source, for example to pick up a mapping change.
Paths served by this method:
$resp = $client->update_by_query(
'body' => $body, # optional
# path parameters
'index' => $index, # required
# Endpoint specific query string parameters
'_source' => $qval1, # list
'_source_excludes' => $qval2, # list
'_source_includes' => $qval3, # list
'allow_no_indices' => $qval4, # boolean
'analyze_wildcard' => $qval5, # boolean
'analyzer' => $qval6, # string
'conflicts' => $qval7, # string
'default_operator' => $qval8, # string
'df' => $qval9, # string
'expand_wildcards' => $qval10, # list
'from' => $qval11, # number
'ignore_unavailable' => $qval12, # boolean
'lenient' => $qval13, # boolean
'max_docs' => $qval14, # number
'pipeline' => $qval15, # string
'preference' => $qval16, # string
'q' => $qval17, # string
'refresh' => $qval18, # boolean|string
'request_cache' => $qval19, # boolean
'requests_per_second' => $qval20, # number
'routing' => $qval21, # list
'scroll' => $qval22, # string
'scroll_size' => $qval23, # number
'search_timeout' => $qval24, # string
'search_type' => $qval25, # string
'size' => $qval26, # number
'slices' => $qval27, # number|string
'sort' => $qval28, # list
'stats' => $qval29, # list
'terminate_after' => $qval30, # number
'timeout' => $qval31, # string
'version' => $qval32, # boolean
'wait_for_active_shards' => $qval33, # string
'wait_for_completion' => $qval34, # boolean
# Common API query string parameters
'error_trace' => $qval35, # boolean
'filter_path' => $qval36, # list
'human' => $qval37, # boolean
'pretty' => $qval38, # boolean
'source' => $qval39, # string
);
OpenSearch documentation for $client->update_by_query
update_by_query_rethrottle
Changes the number of requests per second for a particular Update By Query operation.
Paths served by this method:
$resp = $client->update_by_query_rethrottle(
# path parameters
'task_id' => $task_id, # required
# Endpoint specific query string parameters
'requests_per_second' => $qval1, # number
# Common API query string parameters
'error_trace' => $qval2, # boolean
'filter_path' => $qval3, # list
'human' => $qval4, # boolean
'pretty' => $qval5, # boolean
'source' => $qval6, # string
);
OpenSearch documentation for $client->update_by_query_rethrottle
bulk_helper
Returns a new instance of the bulk_helper_class which makes it easier to run multiple create, index, update or delete actions in a single request.
my $helper = $client->bulk_helper( @args );
scroll_helper
Returns a new instance of the scroll_helper_class - a helper module for scrolled searches
my $helper = $client->scroll_helper( @args );
MANUAL
Documentation index OpenSearch::Client::Manual
HISTORY
This distribution is derived from Search::Elasticsearch version 7.714. All subsequent changes are unique to this distribution.
AUTHOR
Mark Dootson <mdootson@cpan.org> ( current maintainer )
CREDITS
OpenSearch::Client is based on Search::Elasticsearch version 7.714 by Enrico Zimuel <enrico.zimuel@elastic.co>.
COPYRIGHT AND LICENSE
Copyright (C) 2026 by Mark Dootson ( this distribution )
Copyright (C) 2021 by Elasticsearch BV ( original distribution )
This is free software, licensed under:
The Apache License, Version 2.0, January 2004