Skip to content

Commit

Permalink
Provide variation of the workload(s) with unsigned_long data type (op…
Browse files Browse the repository at this point in the history
…ensearch-project#86)

* Provide variation of the workload(s) with unsigned_long data type

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

* Address review comments

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

* Address code review comments

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

---------

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
  • Loading branch information
reta authored and gkamat committed Aug 10, 2023
1 parent 50185f3 commit 794e712
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
16 changes: 15 additions & 1 deletion nyc_taxis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ bzip2 -k documents.json

### Parameters

This workload allows to overwrite the following parameters using `--workload-params`:
This workload allows [specifying the following parameters](#specifying-workload-parameters) using the `--workload-params` option to OpenSearch Benchmark:

* `bulk_size` (default: 10000)
* `bulk_indexing_clients` (default: 8): Number of clients that issue bulk indexing requests.
Expand All @@ -73,6 +73,20 @@ This workload allows to overwrite the following parameters using `--workload-par
* `error_level` (default: "non-fatal"): Available for bulk operations only to specify ignore-response-error-level.
* `target_throughput` (default: default values for each operation): Number of requests per second, `none` for no limit.
* `search_clients`: Number of clients that issues search requests.
* `trip_distance_mapping` (default: { "scaling_factor": 100, "type": "scaled_float" }): The `trip_distance` field type mapping

### Specifying Workload Parameters

Example:
```json
{
"trip_distance_mapping": {
"type": "unsigned_long"
}
}
```

Save it as `params.json` and provide it to OpenSearch Benchmark with `--workload-params="/path/to/params.json"`. The overrides for simple parameters could be specified in-place, for example `--workload-params=search_clients:2`.

### Test Procedures
The workload contains multiple test procedures, see [TEST_PROCEDURES](TEST_PROCEDURES.md) for details.
Expand Down
2 changes: 1 addition & 1 deletion nyc_taxis/TEST_PROCEDURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Example:
For OpenSearch version from 2.4 to 2.6, because searchable snapshots is an experimental feature,
an additional cluster setting `"opensearch.experimental.feature.searchable_snapshot.enabled": "true"` is needed to enable the feature.

Save it as `params.json` and provide it to Benchmark with `--provision-config-instance-params="/path/to/params.json"`.
Save it as `params.json` and provide it to OpenSearch Benchmark with `--provision-config-instance-params="/path/to/params.json"`.

### Run the test procedure
The test procedure can be run with parameter `--test-procedure searchable-snapshot`.
Expand Down
4 changes: 2 additions & 2 deletions nyc_taxis/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@
"scaling_factor": 100,
"type": "scaled_float"
},
"trip_distance": {
"trip_distance": {%- if trip_distance_mapping is defined %} {{ trip_distance_mapping | tojson }} {%- else %} {
"scaling_factor": 100,
"type": "scaled_float"
},
}{%- endif %},
"pickup_location": {
"type": "geo_point"
}
Expand Down

0 comments on commit 794e712

Please sign in to comment.