diff --git a/CHANGELOG.md b/CHANGELOG.md index 8aae7e84c..43c0a6e7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Added schema for `/_plugins/_knn/stats`, `/_plugins/_knn/models/{model_id}`, `_train` and `_search` ([#704](https://github.com/opensearch-project/opensearch-api-specification/pull/704)) - Added `retry` support in `prologues` and `epilogues` ([#713](https://github.com/opensearch-project/opensearch-api-specification/pull/713)) - Added response schema for `DELETE /_plugins/_rollup/jobs/{id}`, `POST /_plugins/_rollup/jobs/{id}/_start` and `_stop` ([#716](https://github.com/opensearch-project/opensearch-api-specification/pull/716)) +- Added response schema for `GET /_plugins/_knn/warmup/{index}` ([#717](https://github.com/opensearch-project/opensearch-api-specification/pull/717)) ### Removed - Removed unsupported `_common.mapping:SourceField`'s `mode` field and associated `_common.mapping:SourceFieldMode` enum ([#652](https://github.com/opensearch-project/opensearch-api-specification/pull/652)) diff --git a/spec/namespaces/knn.yaml b/spec/namespaces/knn.yaml index d7156d4b9..c547a7894 100644 --- a/spec/namespaces/knn.yaml +++ b/spec/namespaces/knn.yaml @@ -283,7 +283,11 @@ components: type: string required: - model_id - knn.warmup@200: {} + knn.warmup@200: + content: + application/json: + schema: + $ref: '../schemas/_common.yaml#/components/schemas/ShardsOperationResponseBase' parameters: knn.delete_model::path.model_id: name: model_id diff --git a/tests/default/knn/warmup.yaml b/tests/default/knn/warmup.yaml new file mode 100644 index 000000000..656e67ee6 --- /dev/null +++ b/tests/default/knn/warmup.yaml @@ -0,0 +1,30 @@ +$schema: ../../../json_schemas/test_story.schema.yaml + +description: Load all the native library files for all the shards into native memory. +prologues: + - method: PUT + path: /movies + request: + payload: + settings: + index: + knn: true + mappings: + properties: + recommendation_vector: + type: knn_vector + dimension: 8 + status: [200] +epilogues: + - path: /movies + method: DELETE + status: [200, 404] +chapters: + - synopsis: Warmup an index. + method: GET + path: /_plugins/_knn/warmup/{index} + parameters: + index: + - movies + response: + status: 200