Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add operations and schedule sections #5809

Merged
merged 23 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
3167840
Add operations and schedule sections
Naarcha-AWS Dec 6, 2023
7a37952
Add bulk operation documentation
Naarcha-AWS Dec 7, 2023
8a6073d
Merge branch 'main' into schedule-operations
Naarcha-AWS Dec 7, 2023
3911858
Add operations
Naarcha-AWS Dec 12, 2023
4eb61e8
Merge branch 'main' into schedule-operations
Naarcha-AWS Dec 13, 2023
0adadb5
Place operations under workloads. Add remaining operations.
Naarcha-AWS Dec 13, 2023
a2261ea
Fix link
Naarcha-AWS Dec 13, 2023
209035d
Apply suggestions from code review
Naarcha-AWS Dec 19, 2023
f0e52dd
Apply suggestions from code review
Naarcha-AWS Dec 19, 2023
bb571b2
Apply suggestions from code review
Naarcha-AWS Dec 19, 2023
f7df355
Apply suggestions from code review
Naarcha-AWS Dec 19, 2023
7d1b482
Update test-procedures.md
Naarcha-AWS Dec 19, 2023
d7e7463
Apply suggestions from code review
Naarcha-AWS Dec 20, 2023
e2fc5b4
Update _benchmark/reference/workloads/operations.md
Naarcha-AWS Dec 20, 2023
7ca24af
Apply suggestions from code review
Naarcha-AWS Dec 20, 2023
7e6c868
Update operations.md
Naarcha-AWS Dec 20, 2023
cd16240
Apply suggestions from code review
Naarcha-AWS Dec 20, 2023
21bbd5f
Update operations.md
Naarcha-AWS Dec 20, 2023
015576a
Apply suggestions from code review
Naarcha-AWS Dec 20, 2023
3e5a717
Apply suggestions from code review
Naarcha-AWS Dec 20, 2023
c8b9094
Update _benchmark/reference/workloads/test-procedures.md
Naarcha-AWS Dec 20, 2023
17bbd27
Update test-procedures.md
Naarcha-AWS Dec 20, 2023
37b7711
Change nav order
Naarcha-AWS Dec 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
323 changes: 323 additions & 0 deletions _benchmark/reference/workloads/operations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,323 @@
---
layout: default
title: operations
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
parent: Workload reference
grand_parent: OpenSearch Benchmark Reference
nav_order: 110
---

# operations
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

The `operations` element contains a list of all operations that are available when specifying a schedule.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

## bulk
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

The `bulk` operation type allows you run [bulk](/api-reference/document-apis/bulk/) requests as a task.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

### Usage

The following example shows a `bulk` operations with a `bulk-size` of 5000 documents.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

```yml
{
"name": "index-append",
"operation-type": "bulk",
"bulk-size": 5000
}
```

### Split documents among clients

With multiple `clients`, OpenSearch Benchmark splits each document based on the number of clients set. This ensures that the bulk index operations are efficiently parallelized but has the drawback that the ingestion is not done in the order of each document. For example, if `clients` is set to `2`, one client indexes the document starting from the beginning, while the other indexes starting from the middle.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

Additionally, if there are multiple documents or corpora, OpenSearch Benchmark tries to index all documents in parallel in two ways:
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

1. 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.
2. Each client is assigned to multiple documents. Client 1 starts with the first split of the first document of the first corpus. Then it will move on to the first split of the first document of the second corpus, and so on.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

### Options
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Global comment: Should the heading be "Configuration options" or "Configuration parameters?"


Use the following options to customize the bulk operation.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

Parameter | Required | Type | Description
:--- | :--- | :--- | :---
`bulk-size` | Yes | Number | Sets the number of documents ingested in the bulk requested.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
`ingest-percentage` No | Range [0, 100] | Defines using a number between [0, 100], how much of document corpus will be indexed.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
`corpora` | No | List | A list of document corpus names that 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.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
`indices` | No | List | A list of index names that defines which indexes should be used in the bulk index operation. OpenSearch Benchmark will only select document files that have a matching `target-index`.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
`batch-size` | No | Number | Defines how many documents OpenSearch Benchmark reads at once. This is an expert setting and 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 batch-size higher.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
`pipeline` | No | String | Defines the name of an existing ingest pipeline that should be used.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
`conflicts` | No | String | The type of index conflicts to simulate. If not specified, no conflicts will be simulated. Valid values are ‘sequential’, a document ID is replaced with a sequentially increasing ID, and ‘random’, where a document ID is replaced with a random document ID.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
`conflict-probability` | No | Percentage | A number between [0, 100] that defines how many of the documents be replaced when a conflict exists. Combining `conflicts=sequential` and `conflict-probability=0` makes OpenSearch Benchmark generate index ID by itself, instead of relying on OpenSearch’s automatic ID generation. Default is `25%`.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
`on-conflict` | No | String | Determines whether OpenSearch should use the action `index` or `update` index on ID conflicts. Default is `index`, which creates a new index during ID conflicts.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
`recency` | No | Number | A number between [0,1] that indicates recency. Recency towards `1` bias conflicting IDs towards more recent IDs. Recency towards 0 considers all IDs for ID conflicts.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
`detailed-results` | No | Boolean | Records more detailed [meta-data](#meta-data) for bulk requests. As OpenSearch Benchmark analyzes the corresponding bulk response in more detail, this might incur additional overhead which can skew measurement results. This property must be set to true for individual bulk request failures to be logged by OpenSearch Benchmark.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
`timeout` | No | Duration (In minutes) | Defines the time period that OpenSearch will wait per action until it has finished processing the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. Defaults to `1m`.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
`refresh` No | String | Controls OpenSearch's refresh behavior for bulk requests using the `refresh` bulk API query parameter. Valid values are `true`, where OpenSearch refreshes target shards in the background; `wait_for`, OpenSearch blocks bulk requests until affected shards have been refreshed; and `false`, where OpenSearch uses the default refresh behavior.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

### Meta-data
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

The `bulk` operations always returns the following meta-data:
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

- `index`: The name of the affected index. If an index cannot be derived, returns `null`.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
- `weight`: An operation-agnostic representation of the bulk size denoted by `units`.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
- `unit`: The unit in which to interpret `weight`.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
- `success`: A Boolean indicating whether the `bulk` request succeeded.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
- `success-count`: The number of successfully processed bulk items for this request. This value will only be determined in case of errors or if the `bulk-size` has been specified in the documents.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
- `error-count`: The number of failed bulk items for this request.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
- `took`: The value of the `took` property in the bulk response.

If `detailed-results` is `true` the following meta-data is also returned:
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

- `ops`: A nested document with the operation name as key, such as `index`, `update`, or `delete` and various counts as values. `item-count` contains 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.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirm that my addition of "its" retains the intended meaning.

- `shards_histogram`: An array of hashes where each hash has two keys: `item-count` which contains the number of items to which a shard distribution applies, and `shards` contains another hash with the actual distribution of `total`, `successful`, and `failed` shards.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
- `bulk-request-size-bytes`: The total size of the bulk requests body in bytes.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
- `total-document-size-bytes`: The total size of all documents within the bulk request body in bytes.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

## create-index
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

The `create-index` operation runs the [Create Index API](/api-reference/index-apis/create-index/). It supports the following two modes of index creation:

- Create all indexes specified in the workloads `indices` section.
natebower marked this conversation as resolved.
Show resolved Hide resolved
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
- Creates one specific index defined in the operation itself.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

### 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:
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

```yml
{
"name": "create-all-indices",
"operation-type": "create-index",
"settings": {
"index.number_of_shards": 1
},
"request-params": {
"wait_for_active_shards": "true"
}
}
```

The next example creates a new index, with all index setting specified in the body of the operation:
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

```yml
{
"name": "create-an-index",
"operation-type": "create-index",
"index": "people",
"body": {
"settings": {
"index.number_of_shards": 0
},
"mappings": {
"docs": {
"properties": {
"name": {
"type": "text"
}
}
}
}
}
}
```

### Options
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See global comment.


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 `indices` section of the workload.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
`request-params` | No | List of settings | Contains any request parameters allowed by Create Index API. OpenSearch Benchmark will not attempt to serialize the parameters and pass them as is.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

Use the following options when creating a single index in the operation.

Parameter | Required | Type | Description
:--- | :--- | :--- | :---
`index` | Yes | String | The name of the index.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
`body` | No | Request body | The request body for the Create Index API. For more information, see [Create Index API](/api-reference/index-apis/create-index/)
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
`request-params` | No | List of settings | Contains any request parameters allowed by the Create Index API. OpenSearch Benchmark will not attempt to serialize the parameters and pass them as is.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

### Meta-data
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

The `create-index` operation returns the following meta-data:
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

`weight`: The number of indexes created by the operation.
natebower marked this conversation as resolved.
Show resolved Hide resolved
`unit`: Always “ops”.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean the value is the word ops? Or, the value in the ops parameter? Rewrite this fragment to make it a complete sentence and for clarity. Also, for consistency with other unit bullets, should this read "The unit in which to interpret weight. For this operation it is ops."

Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
`success`: A Boolean indicating whether the operation has succeeded.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

## delete-index
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

The `delete-index` runs the [Delete Index API](api-reference/index-apis/delete-index/). Like the [`create-index`](#create-index) operation, you can delete all indexes found in the `indices` section of the workload or you can delete one or more indexes based on string passed in the `index` setting.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

### Usage

The following example deletes all indexes found in `indices` section of the workload:
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

```yml
{
"name": "delete-all-indices",
"operation-type": "delete-index"
}
```

The following example deletes all `logs_*` indexes:

```yml
{
"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"
}
}
```

### Options
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See global comment.


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 index should only be deleted if the index exists. Default is `true`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`only-if-exists` | No | Boolean | Decides whether an index should only be deleted if the index exists. Default is `true`.
`only-if-exists` | No | Boolean | Decides whether an index should be deleted only if the index exists. Default is `true`.

`request-params` | No | List of settings | Contains any request parameters allowed by the Create Index API. OpenSearch Benchmark will not attempt to serialize the parameters and pass them as is.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`request-params` | No | List of settings | Contains any request parameters allowed by the Create Index API. OpenSearch Benchmark will not attempt to serialize the parameters and pass them as is.
`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 pass them as is.


Use the following options if you want to delete one or more indexes based on pattern indicated in the `index` option:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Use the following options if you want to delete one or more indexes based on pattern indicated in the `index` option:
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 name of the index or indexes you want to delete.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`index` | Yes | String | The name of the index or indexes you want to delete.
`index` | Yes | String | The index or indexes you want to delete.

`only-if-exists` | No | Boolean | Decides whether an index should only be deleted if the index exists. Default is `true`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`only-if-exists` | No | Boolean | Decides whether an index should only be deleted if the index exists. Default is `true`.
`only-if-exists` | No | Boolean | Decides whether an index should be deleted only if the index exists. Default is `true`.

`request-params` | No | List of settings | Contains any request parameters allowed by Create Index API. OpenSearch Benchmark will not attempt to serialize the parameters and pass them as is.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`request-params` | No | List of settings | Contains any request parameters allowed by Create Index API. OpenSearch Benchmark will not attempt to serialize the parameters and pass them as is.
`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 pass them as is.


### Meta-data
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Meta-data
### Metadata


The `delete-index` operation returns the following meta-data.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `delete-index` operation returns the following meta-data.
The `delete-index` operation returns the following metadata.


`weight`: The number of indexes created by the operation.
`unit`: Always “ops”.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean the value is the word ops? Or, the value in the ops parameter? Rewrite this fragment to make it a complete sentence and for clarity. Also, for consistency with other unit bullets, should this read "The unit in which to interpret weight. For this operation it is ops."

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Above, I have changed to "Always ops, indicating the number of operations inside the workload." Bulleted lists consisting of only fragments (incomplete sentences) do not require periods.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should "ops" be in code font?

`success`: A Boolean indicating whether the operation has succeeded.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

## cluster-health
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

The `cluster-health` operation runs the [Cluster Health API](api-reference/cluster-api/cluster-health/), which checks the cluster health status and returns the expected status according the parameters set in the `request-params` option. If an unexpected cluster health status is returned, the operation reports a failure. You can use the `--on-error` option in the OpenSearch Benchmark `execute-test` command to control how OpenSearch Benchmark behaves when an the health check fails.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `cluster-health` operation runs the [Cluster Health API](api-reference/cluster-api/cluster-health/), which checks the cluster health status and returns the expected status according the parameters set in the `request-params` option. If an unexpected cluster health status is returned, the operation reports a failure. You can use the `--on-error` option in the OpenSearch Benchmark `execute-test` command to control how OpenSearch Benchmark behaves when an the health check fails.
The `cluster-health` operation runs the [Cluster Health API](api-reference/cluster-api/cluster-health/), which checks the cluster health status and returns the expected status according the parameters set for `request-params`. If an unexpected cluster health status is returned, the operation reports a failure. You can use the `--on-error` option in the OpenSearch Benchmark `execute-test` command to control how OpenSearch Benchmark behaves when the health check fails.


Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

### Usage

The following example creates a `cluster-health` operation which checks for a `green` health status on the any `log-*` indexes:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The following example creates a `cluster-health` operation which checks for a `green` health status on the any `log-*` indexes:
The following example creates a `cluster-health` operation that checks for a `green` health status on the any `log-*` indexes:


```yml
{
"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
}

```

### Options

Use the following options with the `cluster-health` operation.

Parameter | Required | Type | Description
:--- | :--- | :--- | :---
`index` | Yes | String | The name of the index or indexes you want to delete.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`index` | Yes | String | The name of the index or indexes you want to delete.
`index` | Yes | String | The index or indexes you want to delete.

`request-params` | No | List of settings | Contains any request parameters allowed by the Cluster Health API. OpenSearch Benchmark will not attempt to serialize the parameters and pass them as is.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`request-params` | No | List of settings | Contains any request parameters allowed by the Cluster Health API. OpenSearch Benchmark will not attempt to serialize the parameters and pass them as is.
`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 pass them as is.


### Meta-data
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

The `cluster-health` operation returns the following meta-data.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `cluster-health` operation returns the following meta-data.
The `cluster-health` operation returns the following metadata.


- `weight`: Always 1.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency, all these bullets should be complete sentences.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, if they're not, bulleted lists consisting of only fragments (incomplete sentences) do not require periods.

- `unit`: Always “ops”.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean the value is the word ops? Or, the value in the ops parameter? Rewrite this fragment to make it a complete sentence and for clarity. Also, for consistency with other unit bullets, should this read "The unit in which to interpret weight. For this operation it is ops."

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Above, I have changed to "Always ops, indicating the number of operations inside the workload."

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should "ops" be in code font?

- `success`: A Boolean which indicates whether the operation has succeeded.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `success`: A Boolean which indicates whether the operation has succeeded.
- `success`: A Boolean that indicates whether the operation has succeeded.

- `cluster-status`: Current cluster status.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `cluster-status`: Current cluster status.
- `cluster-status`: The current cluster status.

- `relocating-shards`: The number of shards currently relocating to a different node.

## refresh
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

The `refresh` operations runs the Refresh API. This `operation` returns no meta-data.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `refresh` operations runs the Refresh API. This `operation` returns no meta-data.
The `refresh` operations runs the Refresh API. The `operation` returns no metadata.


### Usage

The following example refreshes all `logs-*` indexes:

```yml
{
"name": "refresh",
"operation-type": "refresh",
"index": "logs-*"
}
```

### Options

The `refresh` operation uses the following options.

Parameter | Required | Type | Description
:--- | :--- | :--- | :---
`index` | No | String | The name of the index(es) or data streams to refresh.
Copy link
Contributor

@vagimeli vagimeli Dec 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`index` | No | String | The name of the index(es) or data streams to refresh.
`index` | No | String | The name of indexes or data streams to refresh.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There can be multiple indexes or data streams, adjusting your suggestion.


## search
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

The `search` operation runs the [Search API](/api-reference/search/), which gives you the ability to run queries in OpenSearch Benchmark indexes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `search` operation runs the [Search API](/api-reference/search/), which gives you the ability to run queries in OpenSearch Benchmark indexes.
The `search` operation runs the [Search API](/api-reference/search/), which you can use to run queries in OpenSearch Benchmark indexes.


### Usage

The follow example runs a `match_all` query inside the `search` operation:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The follow example runs a `match_all` query inside the `search` operation:
The following example runs a `match_all` query inside the `search` operation:


```yml
{
"name": "default",
"operation-type": "search",
"body": {
"query": {
"match_all": {}
}
},
"request-params": {
"_source_include": "some_field",
"analyze_wildcard": "false"
}
}
```

### Options

The `search` operation uses the following options.

Parameter | Required | Type | Description
:--- | :--- | :--- | :---
`index` | No | String | The name of the index(es) or data streams that query targets. This options is only needed when the `indices` section contains more than one index. Otherwise, OpenSearch Benchmark automatically derives the index or data stream to use. To query against all indexes in the workload, specify `"index": "_all"`.
Copy link
Contributor

@vagimeli vagimeli Dec 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`index` | No | String | The name of the index(es) or data streams that query targets. This options is only needed when the `indices` section contains more than one index. Otherwise, OpenSearch Benchmark automatically derives the index or data stream to use. To query against all indexes in the workload, specify `"index": "_all"`.
`index` | No | String | The indexes or data streams targeted by the query. The 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 | Whether to use the query request cache. OpenSearch Benchmark defines no value. The default depends on the benchmark candidate settings and OpenSearch version.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`cache` | No | Boolean | Whether to use the query request cache. OpenSearch Benchmark defines no value. The default depends on the benchmark candidate settings and OpenSearch version.
`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 | The query body that indicates which query to use and the query parameters.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`body` | Yes | Request body | The query body that indicates which query to use and the query parameters.
`body` | Yes | Request body | Indicates which query to use and the query parameters.

`detailed-results` | No | Boolean | Records more detailed meta-data about queries. When `true`, OpenSearch Benchmark might incur additional overhead to return the detailed results, which can skew measurement results. This option does not work with `scroll` queries.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`detailed-results` | No | Boolean | Records more detailed meta-data about queries. When `true`, OpenSearch Benchmark might incur additional overhead to return the detailed results, which can skew measurement results. This option does not work with `scroll` queries.
`detailed-results` | No | Boolean | Records more detailed metadata about queries. When set to `true`, additional overhead may be incurred, which can skew measurement results. The option does not work with `scroll` queries.

`results-per-page` | No | Integer | The number of documents to retrieve per page. This maps to the Search API’s `size` parameter, and can be used for scroll and non-scroll searches. Default is 10.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`results-per-page` | No | Integer | The number of documents to retrieve per page. This maps to the Search API’s `size` parameter, and can be used for scroll and non-scroll searches. Default is 10.
`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.


### Meta-data
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Meta-data
### Metadata


The following meta-data is always returned:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The following meta-data is always returned:
The following metadata is always returned:

- `weight`: The “weight” of an operation. Always `1` for regular queries and the number of retrieved pages for scroll queries.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `weight`: The “weight” of an operation. Always `1` for regular queries and the number of retrieved pages for scroll queries.
- `weight`: The “weight” of an operation. Always `1` for regular queries and the number of retrieved pages for scroll queries.

- `unit`: The unit in which to interpret weight. Always “ops” for regular queries and “pages” for scroll queries.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
- `success`: A Boolean indicating whether the query has succeeded.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

If `detailed-results` is set to `true`, the following meta-data is also returned:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Insert a blank line between the sentence and bullet.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If `detailed-results` is set to `true`, the following meta-data is also returned:
If `detailed-results` is set to `true`, the following meta-data is also returned:
Suggested change
If `detailed-results` is set to `true`, the following meta-data is also returned:
If `detailed-results` is set to `true`, the following metadata is also returned:

- `hits`: The total number of hits for this query.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `hits`: The total number of hits for this query.
- `hits`: The total number of hits for the query.

- `hits_relation`: whether hits is accurate (eq) or a lower bound of the actual hit count (gte).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `hits_relation`: whether hits is accurate (eq) or a lower bound of the actual hit count (gte).
- `hits_relation`: Whether the number of hits is accurate (eq) or a lower bound of the actual hit count (gte).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirm that my change retains the intended meaning.

- `timed_out`: Whether the query has timed out. For scroll queries, this flag is true if the flag was true for any of the queries issued.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should either or both instances of "true" be in code font? Should "set to" precede the second instance of "true"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `timed_out`: Whether the query has timed out. For scroll queries, this flag is true if the flag was true for any of the queries issued.
- `timed_out`: Whether the query has timed out. For scroll queries, this flag is `true` if the flag was `true` for any of the queries issued.


Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
- `took`: The value of the the `took` property in the query response. For scroll queries, this value is the sum of all took values in query responses.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `took`: The value of the the `took` property in the query response. For scroll queries, this value is the sum of all took values in query responses.
- `took`: The value of the `took` property in the query response. For scroll queries, the value is the sum of all `took` values in the query responses.



Loading