operations
The operations element contains a list of all available operations for specifying a schedule.
bulk
The bulk operation type allows you to run bulk requests as a task.
Usage
The following example shows a bulk operation type with a bulk-size of 5000 documents:
{
"name": "index-append",
"operation-type": "bulk",
"bulk-size": 5000
}
Split documents among clients
When you have multiple clients, OpenSearch Benchmark splits each document based on the set number of clients. Having multiple clients parallelizes the bulk index operations but doesn’t preserve the ingestion order of each document. For example, if clients is set to 2, one client indexes the document starting from the beginning, while the other client indexes the document starting from the middle.
If there are multiple documents or corpora, OpenSearch Benchmark attempts to index all documents in parallel in two ways:
- Each client starts at a different point in the corpus. For example, in a workload with 2 corpora and 5 clients, clients 1, 3, and 5 begin with the first corpus, whereas clients 2 and 4 start with the second corpus.
- Each client is assigned to multiple documents. Client 1 starts with the first split of the first document of the first corpus. Then it moves to the first split of the first document of the second corpus, and so on.
Configuration options
Use the following options to customize the bulk operation.
| Parameter | Required | Type | Description |
|---|---|---|---|
bulk-size | Yes | Number | Specifies the number of documents to be ingested in the bulk request. |
ingest-percentage | No | Range [0, 100] | Defines the portion of the document corpus to be indexed. Valid values are numbers between 0 and 100. |
corpora | No | List | Defines which document corpus names should be targeted by the bulk operation. Only needed if the corpora section contains more than one document corpus and you don’t want to index all of them during the bulk request. |
indices | No | List | Defines which indexes should be used in the bulk index operation. OpenSearch Benchmark only selects document files that have a matching target-index. |
batch-size | No | Number | Defines how many documents OpenSearch Benchmark reads simultaneously. This is an expert setting and is only meant to avoid accidental bottlenecks for very small bulk sizes. If you want to benchmark with a bulk-size of 1, you should set a higher batch-size. |
pipeline | No | String | Defines which existing ingest pipeline to use. |
conflicts | No | String | Defines the type of index conflicts to simulate. If not specified, none are simulated. Valid values are ‘sequential’, which replaces a document ID with a sequentially increasing document ID, and ‘random’, which replaces a document ID with a random document ID. |
conflict-probability | No | Percentage | Defines how many of the documents are replaced when a conflict exists. Combining conflicts=sequential and conflict-probability=0 makes OpenSearch Benchmark generate the index ID itself instead of using OpenSearch’s automatic ID generation. Valid values are numbers between 0 and 100. Default is 25%. |
on-conflict | No | String | Determines whether OpenSearch should use the action index or update index for ID conflicts. Default is index, which creates a new index during ID conflicts. |
recency | No | Number | Uses a number between 0 and 1 to indicate recency. A recency closer to 1 biases conflicting IDs toward more recent IDs. A recency closer to 0 considers all IDs for ID conflicts. |
detailed-results | No | Boolean | Records more detailed metadata for bulk requests. As OpenSearch Benchmark analyzes the corresponding bulk response in more detail, additional overhead may be incurred, which can skew measurement results. This property must be set to true so that OpenSearch Benchmark logs individual bulk request failures. |
timeout | No | Duration | Defines the amount of time (in minutes) that OpenSearch waits per action until completing the processing of the following operations: automatic index creation, dynamic mapping updates, and waiting for active shards. Default is 1m. |
refresh | No | String | Controls OpenSearch refresh behavior for bulk requests that use the refresh Bulk API query parameter. Valid values are true, which refreshes target shards in the background; wait_for, which blocks bulk requests until affected shards have been refreshed; and false, which uses the default refresh behavior. |
Metadata
The bulk operation always returns the following metadata:
index: The name of the affected index. If an index cannot be derived, it returnsnull.weight: An operation-agnostic representation of the bulk size, denoted byunits.unit: The unit used to interpretweight.success: A Boolean indicating whether thebulkrequest succeeded.success-count: The number of successfully processed bulk items for the request. This value is determined when there are errors or when thebulk-sizehas been specified in the documents.error-count: The number of failed bulk items for the request.took: The value of thetookproperty in the bulk response.
If detailed-results is true, the following metadata is returned:
ops: A nested document with the operation name as its key, such asindex,update, ordelete, and various counts as values.item-countcontains the total number of items for this key. Additionally, OpenSearch Benchmark returns a separate counter for each result, for example, a result for the number of created items or the number of deleted items.shards_histogram: An array of hashes, each of which has two keys. Theitem-countkey contains the number of items to which a shard distribution applies. Theshardskey contains a hash with the actual distribution oftotal,successful, andfailedshards.bulk-request-size-bytes: The total size of the bulk request body, in bytes.total-document-size-bytes: The total size of all documents within the bulk request body, in bytes.
create-index
The create-index operation runs the Create Index API. It supports the following two index creation modes:
- Creating all indexes specified in the workload’s
indicessection - Creating one specific index defined within the operation itself
Usage
The following example creates all indexes defined in the indices section of the workload. It uses all of the index settings defined in the workload but overrides the number of shards:
{
"name": "create-all-indices",
"operation-type": "create-index",
"settings": {
"index.number_of_shards": 1
},
"request-params": {
"wait_for_active_shards": "true"
}
}
The following example creates a new index with all index settings specified in the operation body:
{
"name": "create-an-index",
"operation-type": "create-index",
"index": "people",
"body": {
"settings": {
"index.number_of_shards": 0
},
"mappings": {
"docs": {
"properties": {
"name": {
"type": "text"
}
}
}
}
}
}
Configuration options
Use the following options when creating all indexes from the indices section of a workload.
| Parameter | Required | Type | Description |
|---|---|---|---|
settings | No | Array | Specifies additional index settings to be merged with the index settings specified in the indices section of the workload. |
request-params | No | List of settings | Contains any request parameters allowed by the Create Index API. OpenSearch Benchmark does not attempt to serialize the parameters and passes them in their current state. |
Use the following options when creating a single index in the operation.
| Parameter | Required | Type | Description |
|---|---|---|---|
index | Yes | String | The index name. |
body | No | Request body | The request body for the Create Index API. For more information, see Create Index API. |
request-params | No | List of settings | Contains any request parameters allowed by the Create Index API. OpenSearch Benchmark does not attempt to serialize the parameters and passes them in their current state. |
Metadata
The create-index operation returns the following metadata:
weight: The number of indexes created by the operation.unit: Alwaysops, indicating the number of operations inside the workload.success: A Boolean indicating whether the operation has succeeded.
delete-index
The delete-index operation runs the Delete Index API. As with the create-index operation, you can delete all indexes found in the indices section of the workload or delete one or more indexes based on the string passed in the index setting.
Usage
The following example deletes all indexes found in the indices section of the workload:
{
"name": "delete-all-indices",
"operation-type": "delete-index"
}
The following example deletes all logs_* indexes:
{
"name": "delete-logs",
"operation-type": "delete-index",
"index": "logs-*",
"only-if-exists": false,
"request-params": {
"expand_wildcards": "all",
"allow_no_indices": "true",
"ignore_unavailable": "true"
}
}
Configuration options
Use the following options when deleting all indexes indicated in the indices section of the workload.
| Parameter | Required | Type | Description |
|---|---|---|---|
only-if-exists | No | Boolean | Decides whether an existing index should be deleted. Default is true. |
request-params | No | List of settings | Contains any request parameters allowed by the Create Index API. OpenSearch Benchmark does not attempt to serialize the parameters and passes them in their current state. |
Use the following options if you want to delete one or more indexes based on the pattern indicated in the index option.
| Parameter | Required | Type | Description |
|---|---|---|---|
index | Yes | String | The index or indexes that you want to delete. |
only-if-exists | No | Boolean | Decides whether an index should be deleted when the index exists. Default is true. |
request-params | No | List of settings | Contains any request parameters allowed by the Create Index API. OpenSearch Benchmark does not attempt to serialize the parameters and passes them in their current state. |
Metadata
The delete-index operation returns the following metadata:
weight: The number of indexes created by the operation.unit: Alwaysops, for the number of operations inside the workload.success: A Boolean indicating whether the operation has succeeded.
cluster-health
The cluster-health operation runs the Cluster Health API, which checks the cluster health status and returns the expected status according to the parameters set for request-params. If an unexpected cluster health status is returned, then the operation reports a failure. You can use the --on-error option in the OpenSearch Benchmark run command to control how OpenSearch Benchmark behaves when the health check fails.
Usage
The following example creates a cluster-health operation that checks for a green health status on any log-* indexes:
{
"name": "check-cluster-green",
"operation-type": "cluster-health",
"index": "logs-*",
"request-params": {
"wait_for_status": "green",
"wait_for_no_relocating_shards": "true"
},
"retry-until-success": true
}
Configuration options
Use the following options with the cluster-health operation.
| Parameter | Required | Type | Description |
|---|---|---|---|
index | Yes | String | The index or indexes you want to assess. |
request-params | No | List of settings | Contains any request parameters allowed by the Cluster Health API. OpenSearch Benchmark does not attempt to serialize the parameters and passes them in their current state. |
Metadata
The cluster-health operation returns the following metadata:
weight: The number of indexes thecluster-healthoperation assesses. Always1, since the operation runs once per index.unit: Alwaysops, for the number of operations inside the workload.success: A Boolean indicating whether the operation has succeeded.cluster-status: The current cluster status.relocating-shards: The number of shards currently relocating to a different node.
refresh
The refresh operation runs the Refresh API. The operation returns no metadata.
Usage
The following example refreshes all logs-* indexes:
{
"name": "refresh",
"operation-type": "refresh",
"index": "logs-*"
}
Configuration options
The refresh operation uses the following options.
| Parameter | Required | Type | Description |
|---|---|---|---|
index | No | String | The names of the indexes or data streams to refresh. |
search
The search operation runs the Search API, which you can use to run queries in OpenSearch Benchmark indexes.
Usage
The following example runs a match_all query inside the search operation:
{
"name": "default",
"operation-type": "search",
"body": {
"query": {
"match_all": {}
}
},
"request-params": {
"_source_include": "some_field",
"analyze_wildcard": "false"
}
}
Configuration options
The search operation uses the following options.
| Parameter | Required | Type | Description |
|---|---|---|---|
index | No | String | The indexes or data streams targeted by the query. This option is needed only when the indices section contains two or more indexes. Otherwise, OpenSearch Benchmark automatically derives the index or data stream to use. Specify "index": "_all" to query against all indexes in the workload. |
cache | No | Boolean | Specifies whether to use the query request cache. OpenSearch Benchmark defines no value. The default depends on the benchmark candidate settings and the OpenSearch version. |
request-params | No | List of settings | Contains any request parameters allowed by the Search API. |
body | Yes | Request body | Indicates which query and query parameters to use. |
detailed-results | No | Boolean | Records more detailed metadata about queries. When set to true, additional overhead may be incurred, which can skew measurement results. This option does not work with scroll queries. |
results-per-page | No | Integer | Specifies the number of documents to retrieve per page. This maps to the Search API size parameter and can be used for scroll and non-scroll searches. Default is 10. |
Metadata
The following metadata is always returned:
weight: The “weight” of an operation. Always1for regular queries and the number of retrieved pages for scroll queries.unit: The unit used to interpret weight, which isopsfor regular queries andpagesfor scroll queries.success: A Boolean indicating whether the query has succeeded.
If detailed-results is set to true, the following metadata is also returned:
hits: The total number of hits for the query.hits_relation: Whether the number of hits is accurate (eq) or a lower bound of the actual hit count (gte).timed_out: Whether the query has timed out. For scroll queries, this flag istrueif the flag wastruefor any of the queries issued.took: The value of thetookproperty in the query response. For scroll queries, the value is the sum of alltookvalues in all query responses.
paginated-search
The paginated-search operation runs a sequence of paginated search requests using the search_after parameter. It accepts the same options as search plus pages, which controls how many pages to retrieve.
Configuration options
In addition to the options listed under search:
| Parameter | Required | Type | Description |
|---|---|---|---|
pages | Yes | Integer | The maximum number of pages to retrieve. If the query returns fewer matching results than the requested number of pages, the operation terminates early. |
Metadata
In addition to the metadata returned by search:
pages: The total number of pages retrieved.
scroll-search
The scroll-search operation runs a scroll search. It accepts the same options as search plus pages, which controls how many scroll pages to fetch.
Configuration options
In addition to the options listed under search:
| Parameter | Required | Type | Description |
|---|---|---|---|
pages | Yes | Integer | The maximum number of scroll pages to retrieve. If the scroll exhausts before this number is reached, the operation terminates early. |
Metadata
In addition to the metadata returned by search:
pages: The total number of scroll pages retrieved.
force-merge
The force-merge operation runs the Force Merge API.
Usage
{
"name": "force-merge",
"operation-type": "force-merge",
"index": "_all",
"request-params": {
"max_num_segments": 1
}
}
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
index | No | String | The index or indexes to force merge. If omitted, the call falls through to the underlying client’s default behavior, which targets all indexes. |
max-num-segments | No | Integer | The target number of segments per shard. Passed as max_num_segments to the Force Merge API. |
mode | No | String | Set to polling to issue the force merge asynchronously and poll the Tasks API until it completes. When omitted, the call waits synchronously and may time out on large indexes. |
poll-period | Conditional | Number | Required when mode is polling: the time in seconds between status polls. The operation raises an error if mode: polling is set without this value. |
request-params | No | Object | Additional request parameters passed to the Force Merge API. |
This is an administrative operation. Metrics are not reported by default. Reporting can be forced by setting include-in-reporting to true.
index-stats
The index-stats operation runs the Index Stats API.
Usage
{
"name": "index-stats",
"operation-type": "index-stats",
"index": "_all",
"condition": {
"path": "_all.total.merges.current",
"expected-value": 0
},
"retry-until-success": true
}
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
index | No | String | The index or indexes to retrieve statistics for. Default is _all. |
condition | No | Object | A condition to check in the response. Contains path (dot-notation path in the response) and expected-value. |
request-params | No | Object | Request parameters passed to the Stats API. |
node-stats
The node-stats operation runs the Nodes Stats API.
Usage
{
"name": "node-stats",
"operation-type": "node-stats"
}
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
request-timeout | No | Number | Client-side timeout (in seconds) for the Nodes Stats request. |
vector-search
The vector-search operation runs k-NN vector search queries and optionally computes recall metrics by comparing results against ground truth neighbors.
Usage
{
"name": "knn-search",
"operation-type": "vector-search",
"index": "vectors",
"k": 100,
"body": {
"query": {
"knn": {
"embedding": {
"vector": [0.1, 0.2, 0.3],
"k": 100
}
}
}
}
}
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
index | Yes | String | The target index. Required: omitting it causes the underlying search runner to error out. |
body | Yes | Object | The search request body containing the k-NN query. |
k | No | Integer | The number of nearest neighbors to retrieve. Used for recall calculation. |
detailed-results | No | Boolean | Whether to record detailed metadata. |
calculate-recall | No | Boolean | Whether to compute recall@k and recall@1 against ground truth neighbors. Default is true. |
neighbors | No | Array | The ground truth neighbor IDs for recall calculation. Typically provided by the workload at runtime. |
Metadata
weight: Always1.unit: Alwaysops.success: Whether the search succeeded.recall@k: Recall at k (if ground truth neighbors are provided).recall@1: Recall at 1 (if ground truth neighbors are provided).
bulk-vector-data-set
The bulk-vector-data-set operation bulk-indexes vector data from HDF5 or BigANN dataset files. Supports individual document retry on partial failures.
Usage
{
"name": "bulk-vectors",
"operation-type": "bulk-vector-data-set",
"bulk-size": 500,
"index": "vectors"
}
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
bulk-size | No | Integer | Number of documents per bulk request. |
index | No | String | The target index. |
retries | No | Integer | Number of retry attempts after the initial request fails. Default is 0 (no retries). Each failed document is resubmitted on retry; connection timeouts also trigger a retry. |
retry-wait-period | No | Number | Initial wait period between retries in seconds. Default is 0.5. |
retry-max-wait-period | No | Number | Maximum wait period between retries in seconds (exponential backoff is capped at this value). Default is 60. |
detailed-results | No | Boolean | Records detailed per-document success/failure metadata. Default is true. |
action-metadata-present | No | Boolean | Whether the bulk body includes action metadata lines. Default is true. |
unit | No | String | Unit reported for weight. Default is docs. |
put-pipeline
The put-pipeline operation creates or updates an ingest pipeline.
Usage
{
"name": "define-pipeline",
"operation-type": "put-pipeline",
"id": "my-pipeline",
"body": {
"description": "My ingest pipeline",
"processors": [
{
"set": {
"field": "ingest_time",
"value": "{{_ingest.timestamp}}"
}
}
]
}
}
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
id | Yes | String | The pipeline ID. |
body | Yes | Object | The pipeline definition. |
This is an administrative operation. Metrics are not reported by default.
delete-pipeline
The delete-pipeline operation deletes an ingest pipeline.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
id | Yes | String | The pipeline ID to delete. |
This is an administrative operation. Metrics are not reported by default.
create-search-pipeline
The create-search-pipeline operation creates a search pipeline.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
id | Yes | String | The search pipeline ID. |
body | Yes | Object | The search pipeline definition. |
This is an administrative operation. Metrics are not reported by default.
update-concurrent-segment-search-settings
The update-concurrent-segment-search-settings operation toggles the concurrent segment search cluster setting and, optionally, the maximum slice count. It updates search.concurrent_segment_search.enabled (and search.concurrent.max_slice_count when provided) as persistent cluster settings.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
enable | No | Boolean | Whether concurrent segment search is enabled. Default is false. |
max_slice_count | No | Integer | Maximum number of slices per shard. If omitted, the setting is left unchanged. |
put-settings
The put-settings operation updates cluster settings.
Usage
{
"name": "increase-watermarks",
"operation-type": "put-settings",
"body": {
"transient": {
"cluster.routing.allocation.disk.watermark.low": "95%"
}
}
}
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
body | Yes | Object | The cluster settings to apply. |
This is an administrative operation. Metrics are not reported by default.
create-data-stream
The create-data-stream operation creates one or more data streams.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
data-streams | Yes | List | A list of data stream names to create. |
request-params | Yes | Object | Request parameters forwarded to the Create Data Stream API. Pass an empty object ({}) if none are needed. |
delete-data-stream
The delete-data-stream operation deletes one or more data streams.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
data-streams | Yes | List | A list of data stream names to delete. |
only-if-exists | Yes | Boolean | If true, only delete data streams that exist; if false, attempt to delete each one and ignore HTTP 404 responses. |
request-params | Yes | Object | Request parameters forwarded to the Delete Data Stream API. Pass an empty object ({}) if none are needed. |
create-composable-template
The create-composable-template operation creates one or more composable index templates.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
templates | Yes | List | A list of [template-name, body] pairs to create. |
request-params | Yes | Object | Request parameters forwarded to the API. Pass an empty object ({}) if none are needed. |
delete-composable-template
The delete-composable-template operation deletes one or more composable index templates and, optionally, the indexes they match.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
templates | Yes | List | A list of [template-name, delete-matching-indices, index-pattern] triples. When delete-matching-indices is true and index-pattern is non-empty, indexes matching the pattern are also deleted. |
only-if-exists | Yes | Boolean | If true, only delete templates that exist; if false, attempt to delete each one and ignore HTTP 404 responses. |
request-params | Yes | Object | Request parameters forwarded to the API. Pass an empty object ({}) if none are needed. |
create-component-template
The create-component-template operation creates one or more component templates.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
templates | Yes | List | A list of [template-name, body] pairs to create. |
request-params | Yes | Object | Request parameters forwarded to the API. Pass an empty object ({}) if none are needed. |
delete-component-template
The delete-component-template operation deletes one or more component templates.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
templates | Yes | List | A list of component template names to delete. |
only-if-exists | Yes | Boolean | If true, only delete templates that exist; if false, attempt to delete each one and ignore HTTP 404 responses. |
request-params | Yes | Object | Request parameters forwarded to the API. Pass an empty object ({}) if none are needed. |
create-index-template
The create-index-template operation creates one or more legacy index templates.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
templates | Yes | List | A list of [template-name, body] pairs to create. |
request-params | No | Object | Additional request parameters. |
delete-index-template
The delete-index-template operation deletes one or more legacy index templates and, optionally, the indexes they match.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
templates | Yes | List | A list of [template-name, delete-matching-indices, index-pattern] triples. |
only-if-exists | No | Boolean | If true, only delete templates that exist. Default is false. |
request-params | No | Object | Additional request parameters. |
shrink-index
The shrink-index operation uses the Shrink Index API to reduce the number of primary shards in an index.
Usage
{
"name": "shrink-index",
"operation-type": "shrink-index",
"source-index": "my-index",
"target-index": "my-index-shrunk",
"target-body": {
"settings": {
"index.number_of_shards": 1,
"index.codec": "best_compression"
}
}
}
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
source-index | Yes | String | The source index (or wildcard pattern) to shrink. |
target-index | Yes | String | The name for the shrunk index. When source-index matches multiple indexes, the matched suffix is appended to this name. |
target-body | Yes | Object | Settings and mappings for the target index. |
shrink-node | No | String | The node to allocate the source shards to before shrinking. If omitted, a random data node is chosen. |
create-snapshot-repository
The create-snapshot-repository operation creates a snapshot repository.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
repository | Yes | String | The repository name. |
body | Yes | Object | The repository definition (type, settings). |
request-params | No | Object | Additional request parameters. |
delete-snapshot-repository
The delete-snapshot-repository operation deletes a snapshot repository.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
repository | Yes | String | The repository name to delete. |
create-snapshot
The create-snapshot operation creates a snapshot.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
repository | Yes | String | The repository name. |
snapshot | Yes | String | The snapshot name. |
body | Yes | Object | The snapshot definition. |
wait-for-completion | No | Boolean | Whether to wait for the snapshot to complete before returning. Default is false. To benchmark snapshot duration accurately, leave this false and follow up with wait-for-snapshot-create. |
request-params | No | Object | Additional request parameters. |
wait-for-snapshot-create
The wait-for-snapshot-create operation polls snapshot status until the snapshot reaches SUCCESS. If the snapshot ends in FAILED, the operation raises an assertion error. The reported metrics include snapshot size in bytes, throughput, and duration.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
repository | Yes | String | The repository name. |
snapshot | Yes | String | The snapshot name. |
completion-recheck-wait-period | No | Number | Seconds between status polls. Default is 1. |
restore-snapshot
The restore-snapshot operation restores a snapshot.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
repository | Yes | String | The repository name. |
snapshot | Yes | String | The snapshot name. |
body | No | Object | The restore request body. |
wait-for-completion | No | Boolean | Whether to wait for the restore to complete before returning. Default is false. Pair with wait-for-recovery to benchmark restore duration. |
request-params | No | Object | Additional request parameters. |
wait-for-recovery
The wait-for-recovery operation waits until index recovery completes by polling the Index Recovery API.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
index | Yes | String | The index to monitor for recovery. |
completion-recheck-wait-period | No | Number | Seconds between recovery polls. Default is 1. |
submit-async-search
The submit-async-search operation submits an asynchronous search request and stores the returned asynchronous search ID under the operation name so later operations in the same composite can fetch or delete it.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
name | Yes | String | The operation name. Other operations refer to this name to look up the resulting asynchronous search ID. |
body | Yes | Object | The search request body. |
index | No | String | The target index. |
request-params | No | Object | Additional request parameters forwarded to the Async Search API. |
get-async-search
The get-async-search operation retrieves results from one or more previously submitted asynchronous searches. The operation succeeds only when every referenced search has completed (is_running: false).
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
retrieve-results-for | Yes | String or List | The name of the submit-async-search operation (or a list of names) whose results should be retrieved. |
request-params | No | Object | Additional request parameters forwarded to the Async Search Get API. |
delete-async-search
The delete-async-search operation deletes one or more asynchronous search results.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
delete-results-for | Yes | String or List | The name of the submit-async-search operation (or a list of names) whose results should be deleted. |
create-point-in-time
The create-point-in-time operation creates a Point in Time (PIT) for an index. The resulting PIT ID is stored under the operation name, so later operations in the same composite can reference it.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
name | Yes | String | The operation name. Other operations refer to this name to reuse the resulting PIT ID. |
index | Yes | String | The target index. |
keep-alive | No | String | How long to keep the PIT alive (for example, 5m). Default is 1m. |
request-params | No | Object | Additional request parameters forwarded to the Create PIT API. |
delete-point-in-time
The delete-point-in-time operation deletes one or more PITs. If with-point-in-time-from is set, only the PIT created by the named operation is deleted; otherwise, every PIT on the cluster is deleted.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
with-point-in-time-from | No | String | The name of the create-point-in-time operation whose PIT to delete. If omitted, all PITs are deleted. |
request-params | No | Object | Additional request parameters forwarded to the Delete PIT API. |
list-all-point-in-time
The list-all-point-in-time operation lists all active PITs on the cluster.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
request-params | No | Object | Additional request parameters forwarded to the List PIT API. |
create-transform
The create-transform operation creates an index transform.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
transform-id | Yes | String | The transform ID. |
body | Yes | Object | The transform definition. |
start-transform
The start-transform operation starts a previously created transform.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
transform-id | Yes | String | The transform ID to start. |
timeout | No | Number | Optional client-side timeout for the start request. |
wait-for-transform
The wait-for-transform operation polls the transform status until the transform reaches its next checkpoint (or stops, depending on options).
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
transform-id | Yes | String | The transform ID to monitor. |
force | No | Boolean | Forcefully stop the transform when polling completes. Default is false. |
wait-for-checkpoint | No | Boolean | Wait until all data has been processed through the next checkpoint. Default is true. |
wait-for-completion | No | Boolean | Block until the transform has fully stopped. Default is true. |
transform-timeout | No | Number | Overall transform runtime timeout in seconds. Default is 3600. |
poll-interval | No | Number | How often (in seconds) transform stats are polled. Default is 0.5. |
delete-transform
The delete-transform operation deletes a previously created transform. Missing transforms (HTTP 404) are ignored so this operation is safe to use as a cleanup step.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
transform-id | Yes | String | The transform ID to delete. |
force | No | Boolean | If true, deletes the transform even if it is currently running. Default is false. |
train-knn-model
The train-knn-model operation trains a k-NN model using the Train Model API and polls until training completes.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
body | Yes | Object | The training request body. See the Train Model API for body parameters. |
model_id | Yes | String | The model ID to train. |
retries | No | Integer | Maximum number of poll retries before giving up. Default is 1000. |
poll_period | No | Number | Seconds between status polls. Default is 0.5. |
delete-knn-model
The delete-knn-model operation deletes a trained k-NN model.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
model_id | Yes | String | The model ID to delete. |
ignore-if-model-does-not-exist | No | Boolean | If true, treat a missing model (HTTP 404) as success. Default is false. |
register-ml-model
The register-ml-model operation registers a machine learning model using the ML Commons API. The runner first searches for a model with a matching name; if one already exists, the existing model ID is reused. Otherwise it submits a new registration request and polls until it completes. The resulting model ID is written to model_id.json in the working directory so later operations can consume it.
You can supply the request body in one of two ways: by setting model-config-file to a path on disk, or by setting model-name, model-version, and model-format and letting OpenSearch Benchmark assemble the body for you.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
model-config-file | No | String | Path to a JSON file containing the full registration body. If set, the other body fields are ignored. |
model-name | No | String | The model name. Used to assemble the body when model-config-file is not set. |
model-version | No | String | The model version. |
model-format | No | String | The model format (for example, TORCH_SCRIPT). |
timeout | No | Number | Maximum seconds to wait for the registration task to complete. Default is 120. |
deploy-ml-model
The deploy-ml-model operation deploys (loads) a previously registered ML model. The model ID is read from model_id.json in the working directory (typically written by an earlier register-ml-model operation), so this operation takes no required parameters.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
timeout | No | Number | Maximum seconds to wait for the deploy task to complete. Default is 120. |
create-ml-connector
The create-ml-connector operation creates an ML connector for remote model integration.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
body | Yes | Object | The connector definition. |
delete-ml-connector
The delete-ml-connector operation looks up an ML connector by name and deletes it. If no connector matches the supplied name, the operation is a no-op.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
connector_name | Yes | String | The connector name to look up and delete. |
register-remote-ml-model
The register-remote-ml-model operation registers a remote ML model backed by an ML connector. It polls the registration task until it completes, then writes the resulting model ID to model_id.json in the working directory so later operations can consume it.
If connector_id is not set in the request body, OpenSearch Benchmark reads it from connector_id.json in the working directory (typically written by an earlier create-ml-connector operation).
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
body | Yes | Object | The model registration request body. If connector_id is omitted, it is loaded from connector_id.json. |
delete-ml-model
The delete-ml-model operation looks up models by name, undeploys any that are currently deployed, and then deletes them. Multiple models with the same name (for example, across versions) are all deleted.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
model-name | Yes | String | The model name to look up and delete. |
number-of-hits-to-return | No | Integer | Maximum number of matching models to fetch from the search query. Default is 1000. |
undeploy-timeout | No | Number | Seconds to wait for each model to fully undeploy before deletion. Default is 10. |
raw-request
The raw-request operation sends an arbitrary HTTP request to OpenSearch. Use this for operations not covered by a dedicated operation type.
Usage
{
"name": "check-shard-count",
"operation-type": "raw-request",
"method": "GET",
"path": "/_cat/shards?v",
"body": {}
}
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
method | No | String | HTTP method (GET, POST, PUT, DELETE). Default is GET. |
path | Yes | String | The URL path. Must begin with /. |
body | No | Object | The request body. |
request-params | No | Object | Query string parameters. |
headers | No | Object | HTTP headers to include. |
ignore | No | List | HTTP status codes to ignore (for example, [404]). |
sleep
The sleep operation pauses execution for a specified duration.
Usage
{
"name": "wait-before-search",
"operation-type": "sleep",
"duration": 30
}
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
duration | Yes | Number | Sleep duration in seconds. |
composite
The composite operation executes a structured group of inner operations as a single measured unit, optionally with parallel sub-streams. This is useful when several requests need to share state (for example, creating a PIT, searching with it, and deleting it) or when you want to measure end-to-end timings across a small workflow.
Only a subset of operation types can appear inside composite: create-point-in-time, delete-point-in-time, list-all-point-in-time, search, paginated-search, raw-request, sleep, submit-async-search, get-async-search, and delete-async-search. Nested stream blocks run in parallel.
Usage
{
"name": "pit-search-workflow",
"operation-type": "composite",
"requests": [
{ "operation-type": "create-point-in-time", "name": "pit", "index": "my-index" },
{ "operation-type": "search", "body": { "query": { "match_all": {} } } },
{ "operation-type": "delete-point-in-time", "with-point-in-time-from": "pit" }
]
}
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
requests | Yes | List | The list of inner operations or stream blocks to execute. |
max-connections | No | Integer | Upper bound on the number of concurrent in-flight requests across the composite. Defaults to unbounded. |
produce-stream-message
The produce-stream-message operation publishes messages to a configured message-producer (for example, a Kafka producer) for streaming ingestion benchmarks. The body is split on newlines, and each non-metadata line is sent as an individual message. Producers are configured at the workload or cluster level — the runner itself takes only the producer reference and the message payload.
Configuration options
| Parameter | Required | Type | Description |
|---|---|---|---|
message-producer | Yes | Producer | The producer instance (resolved by the workload at runtime) used to send messages. |
body | Yes | String or Bytes | The newline-delimited message payload. Index-metadata lines ({"index": {"_index": ...}}) are skipped. |
proto-bulk
The proto-bulk operation sends bulk index requests using the gRPC transport instead of HTTP REST. Requires gRPC to be enabled on the target cluster.
Configuration options
Same as bulk, but uses gRPC serialization (Protocol Buffers) instead of JSON over HTTP. Use --grpc-target-hosts to specify the gRPC endpoint.
proto-search
The proto-search operation sends search requests using gRPC transport.
Configuration options
Same as search, but uses gRPC. Use --grpc-target-hosts to specify the gRPC endpoint.
proto-vector-search
The proto-vector-search operation sends vector search requests using gRPC transport.
Configuration options
Same as vector-search, but uses gRPC. Use --grpc-target-hosts to specify the gRPC endpoint.
proto-bulk-vector-data-set
The proto-bulk-vector-data-set operation bulk-indexes vector data sets using the gRPC transport. It is the gRPC counterpart to bulk-vector-data-set.
Configuration options
Same as bulk-vector-data-set, but uses gRPC serialization (Protocol Buffers) instead of JSON over HTTP. Use --grpc-target-hosts to specify the gRPC endpoint.