From 62f1f5f7418f48ee8002f2833eb58043ab47d82e Mon Sep 17 00:00:00 2001 From: gargharsh3134 <51459091+gargharsh3134@users.noreply.github.com> Date: Mon, 11 Nov 2024 19:07:01 +0530 Subject: [PATCH 01/16] Adding specs for new _list/indices and _list/shards APIs (#613) * Adding specs for new _list/indices and _list/shards APIs Signed-off-by: Harsh Garg * Adding changeLog and fix lint Signed-off-by: Harsh Garg * Adding spec tests for list APIs Signed-off-by: Harsh Garg * Updating descriptions of specs Signed-off-by: Harsh Garg * Fixing description of list.indices Signed-off-by: Harsh Garg * Reverting SHA for 3.0.0 Signed-off-by: Harsh Garg * Fixing style errors Signed-off-by: Harsh Garg * Updating SHA for 3.0.0 Signed-off-by: Harsh Garg * Updating SHA for 3.0.0 Signed-off-by: Harsh Garg * Fixing SHA and content schema Signed-off-by: Harsh Garg * Loudly disabling new tests for 3.0 with ToDo Signed-off-by: Harsh Garg --------- Signed-off-by: Harsh Garg Co-authored-by: Harsh Garg --- CHANGELOG.md | 1 + spec/namespaces/list.yaml | 487 ++++++++++++++++++++++++++++++++ tests/default/list/indices.yaml | 141 +++++++++ tests/default/list/shards.yaml | 51 ++++ 4 files changed, 680 insertions(+) create mode 100644 spec/namespaces/list.yaml create mode 100644 tests/default/list/indices.yaml create mode 100644 tests/default/list/shards.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md index c34b38a77..e455a6d4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -152,6 +152,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Changed `cluster.reroute`'s `metric` path param to use an enum of metrics ([#586](https://github.com/opensearch-project/opensearch-api-specification/pull/586)) - Changed `indices.stats`'s `metric` path param to use an enum of metrics ([#586](https://github.com/opensearch-project/opensearch-api-specification/pull/586)) - Changed `CleanupRepositoryResults`' properties to be `int64`s ([#587](https://github.com/opensearch-project/opensearch-api-specification/pull/587)) +- Added `/_list/indices` & `/_list/shards` api specs ([#613](https://github.com/opensearch-project/opensearch-api-specification/pull/613)) ### Deprecated diff --git a/spec/namespaces/list.yaml b/spec/namespaces/list.yaml new file mode 100644 index 000000000..b0dddcd86 --- /dev/null +++ b/spec/namespaces/list.yaml @@ -0,0 +1,487 @@ +openapi: 3.1.0 +info: + title: OpenSearch List API + description: OpenSearch List API. + version: 1.0.0 +paths: + /_list: + get: + operationId: list.help.0 + x-operation-group: list.help + x-version-added: '2.18' + description: Returns help for the List APIs. + externalDocs: + url: https://opensearch.org/docs/latest/api-reference/list/index/ + responses: + '200': + $ref: '#/components/responses/list.help@200' + /_list/indices: + get: + operationId: list.indices.0 + x-operation-group: list.indices + x-version-added: '2.18' + description: Returns paginated information about indexes including number of primaries and replicas, document counts, disk size. + externalDocs: + url: https://opensearch.org/docs/latest/api-reference/list/list-indices/ + parameters: + - $ref: '#/components/parameters/list.indices::query.bytes' + - $ref: '#/components/parameters/list.indices::query.cluster_manager_timeout' + - $ref: '#/components/parameters/list.indices::query.expand_wildcards' + - $ref: '#/components/parameters/list.indices::query.format' + - $ref: '#/components/parameters/list.indices::query.h' + - $ref: '#/components/parameters/list.indices::query.health' + - $ref: '#/components/parameters/list.indices::query.help' + - $ref: '#/components/parameters/list.indices::query.include_unloaded_segments' + - $ref: '#/components/parameters/list.indices::query.local' + - $ref: '#/components/parameters/list.indices::query.master_timeout' + - $ref: '#/components/parameters/list.indices::query.next_token' + - $ref: '#/components/parameters/list.indices::query.pri' + - $ref: '#/components/parameters/list.indices::query.s' + - $ref: '#/components/parameters/list.indices::query.size' + - $ref: '#/components/parameters/list.indices::query.sort' + - $ref: '#/components/parameters/list.indices::query.time' + - $ref: '#/components/parameters/list.indices::query.v' + responses: + '200': + $ref: '#/components/responses/list.indices@200' + /_list/indices/{index}: + get: + operationId: list.indices.1 + x-operation-group: list.indices + x-version-added: '2.18' + description: Returns paginated information about indexes including number of primaries and replicas, document counts, disk size. + externalDocs: + url: https://opensearch.org/docs/latest/api-reference/list/list-indices/ + parameters: + - $ref: '#/components/parameters/list.indices::path.index' + - $ref: '#/components/parameters/list.indices::query.bytes' + - $ref: '#/components/parameters/list.indices::query.cluster_manager_timeout' + - $ref: '#/components/parameters/list.indices::query.expand_wildcards' + - $ref: '#/components/parameters/list.indices::query.format' + - $ref: '#/components/parameters/list.indices::query.h' + - $ref: '#/components/parameters/list.indices::query.health' + - $ref: '#/components/parameters/list.indices::query.help' + - $ref: '#/components/parameters/list.indices::query.include_unloaded_segments' + - $ref: '#/components/parameters/list.indices::query.local' + - $ref: '#/components/parameters/list.indices::query.master_timeout' + - $ref: '#/components/parameters/list.indices::query.next_token' + - $ref: '#/components/parameters/list.indices::query.pri' + - $ref: '#/components/parameters/list.indices::query.s' + - $ref: '#/components/parameters/list.indices::query.size' + - $ref: '#/components/parameters/list.indices::query.sort' + - $ref: '#/components/parameters/list.indices::query.time' + - $ref: '#/components/parameters/list.indices::query.v' + responses: + '200': + $ref: '#/components/responses/list.indices@200' + /_list/shards: + get: + operationId: list.shards.0 + x-operation-group: list.shards + x-version-added: '2.18' + description: Returns paginated details of shard allocation on nodes. + externalDocs: + url: https://opensearch.org/docs/latest/api-reference/list/list-shards/ + parameters: + - $ref: '#/components/parameters/list.shards::query.bytes' + - $ref: '#/components/parameters/list.shards::query.cluster_manager_timeout' + - $ref: '#/components/parameters/list.shards::query.format' + - $ref: '#/components/parameters/list.shards::query.h' + - $ref: '#/components/parameters/list.shards::query.help' + - $ref: '#/components/parameters/list.shards::query.local' + - $ref: '#/components/parameters/list.shards::query.master_timeout' + - $ref: '#/components/parameters/list.shards::query.next_token' + - $ref: '#/components/parameters/list.shards::query.s' + - $ref: '#/components/parameters/list.shards::query.size' + - $ref: '#/components/parameters/list.shards::query.sort' + - $ref: '#/components/parameters/list.shards::query.time' + - $ref: '#/components/parameters/list.shards::query.v' + responses: + '200': + $ref: '#/components/responses/list.shards@200' + /_list/shards/{index}: + get: + operationId: list.shards.1 + x-operation-group: list.shards + x-version-added: '2.18' + description: Returns paginated details of shard allocation on nodes. + externalDocs: + url: https://opensearch.org/docs/latest/api-reference/list/list-shards/ + parameters: + - $ref: '#/components/parameters/list.shards::path.index' + - $ref: '#/components/parameters/list.shards::query.bytes' + - $ref: '#/components/parameters/list.shards::query.cluster_manager_timeout' + - $ref: '#/components/parameters/list.shards::query.format' + - $ref: '#/components/parameters/list.shards::query.h' + - $ref: '#/components/parameters/list.shards::query.help' + - $ref: '#/components/parameters/list.shards::query.local' + - $ref: '#/components/parameters/list.shards::query.master_timeout' + - $ref: '#/components/parameters/list.shards::query.next_token' + - $ref: '#/components/parameters/list.shards::query.s' + - $ref: '#/components/parameters/list.shards::query.size' + - $ref: '#/components/parameters/list.shards::query.sort' + - $ref: '#/components/parameters/list.shards::query.time' + - $ref: '#/components/parameters/list.shards::query.v' + responses: + '200': + $ref: '#/components/responses/list.shards@200' +components: + responses: + list.help@200: + content: + text/plain: + schema: + type: string + list.indices@200: + content: + text/plain: + schema: + type: string + application/json: + schema: + type: object + properties: + next_token: + type: ['null', string] + indices: + type: array + items: + $ref: '../schemas/cat.indices.yaml#/components/schemas/IndicesRecord' + application/yaml: + schema: + type: object + properties: + next_token: + type: ['null', string] + indices: + type: array + items: + $ref: '../schemas/cat.indices.yaml#/components/schemas/IndicesRecord' + application/cbor: + schema: + type: object + properties: + next_token: + type: ['null', string] + indices: + type: array + items: + $ref: '../schemas/cat.indices.yaml#/components/schemas/IndicesRecord' + application/smile: + schema: + type: object + properties: + next_token: + type: ['null', string] + indices: + type: array + items: + $ref: '../schemas/cat.indices.yaml#/components/schemas/IndicesRecord' + list.shards@200: + content: + text/plain: + schema: + type: string + application/json: + schema: + type: object + properties: + next_token: + type: ['null', string] + shards: + type: array + items: + $ref: '../schemas/cat.shards.yaml#/components/schemas/ShardsRecord' + application/yaml: + schema: + type: object + properties: + next_token: + type: ['null', string] + shards: + type: array + items: + $ref: '../schemas/cat.shards.yaml#/components/schemas/ShardsRecord' + application/cbor: + schema: + type: object + properties: + next_token: + type: ['null', string] + shards: + type: array + items: + $ref: '../schemas/cat.shards.yaml#/components/schemas/ShardsRecord' + application/smile: + schema: + type: object + properties: + next_token: + type: ['null', string] + shards: + type: array + items: + $ref: '../schemas/cat.shards.yaml#/components/schemas/ShardsRecord' + parameters: + list.indices::path.index: + in: path + name: index + description: |- + Comma-separated list of data streams, indexes, and aliases used to limit the request. + Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + required: true + schema: + $ref: '../schemas/_common.yaml#/components/schemas/Indices' + style: simple + list.indices::query.bytes: + in: query + name: bytes + description: The unit used to display byte values. + schema: + $ref: '../schemas/_common.yaml#/components/schemas/ByteUnit' + style: form + list.indices::query.cluster_manager_timeout: + name: cluster_manager_timeout + in: query + description: Operation timeout for connection to cluster-manager node. + schema: + $ref: '../schemas/_common.yaml#/components/schemas/Duration' + x-version-added: '2.0' + list.indices::query.expand_wildcards: + in: query + name: expand_wildcards + description: The type of index that wildcard patterns can match. + schema: + $ref: '../schemas/_common.yaml#/components/schemas/ExpandWildcards' + style: form + list.indices::query.format: + name: format + in: query + description: A short version of the Accept header, such as `JSON`, `YAML`. + schema: + type: string + description: A short version of the Accept header, such as `JSON`, `YAML`. + list.indices::query.h: + name: h + in: query + description: Comma-separated list of column names to display. + style: form + schema: + type: array + items: + type: string + description: Comma-separated list of column names to display. + explode: true + list.indices::query.health: + in: query + name: health + description: The health status used to limit returned indexes. By default, the response includes indexes of any health status. + schema: + $ref: '../schemas/_common.yaml#/components/schemas/HealthStatus' + style: form + list.indices::query.help: + name: help + in: query + description: Return help information. + schema: + type: boolean + default: false + description: Return help information. + list.indices::query.include_unloaded_segments: + in: query + name: include_unloaded_segments + description: If true, the response includes information from segments that are not loaded into memory. + schema: + type: boolean + default: false + style: form + list.indices::query.local: + name: local + in: query + description: Return local information, do not retrieve the state from cluster-manager node. + schema: + type: boolean + default: false + description: Return local information, do not retrieve the state from cluster-manager node. + list.indices::query.master_timeout: + name: master_timeout + in: query + description: Operation timeout for connection to cluster manager node. + schema: + $ref: '../schemas/_common.yaml#/components/schemas/Duration' + x-version-deprecated: '2.0' + x-deprecation-message: To promote inclusive language, use `cluster_manager_timeout` instead. + deprecated: true + list.indices::query.pri: + in: query + name: pri + description: If true, the response only includes information from primary shards. + schema: + type: boolean + default: false + style: form + list.indices::query.s: + name: s + in: query + description: Comma-separated list of column names or column aliases to sort by. + style: form + schema: + type: array + items: + type: string + description: Comma-separated list of column names or column aliases to sort by. + explode: true + list.indices::query.time: + in: query + name: time + description: The unit used to display time values. + schema: + $ref: '../schemas/_common.yaml#/components/schemas/TimeUnit' + style: form + list.indices::query.v: + name: v + in: query + description: Verbose mode. Display column headers. + schema: + type: boolean + default: false + description: Verbose mode. Display column headers. + list.indices::query.next_token: + name: next_token + in: query + description: Token to retrieve next page of indexes. + schema: + type: ['null', string] + description: Token to retrieve next page of indexes. + list.indices::query.size: + name: size + in: query + description: Maximum number of indexes to be displayed in a page. + schema: + type: integer + format: int32 + list.indices::query.sort: + name: sort + in: query + description: Defines order in which indexes will be displayed. Accepted values are `asc` and `desc`. If `desc`, most recently created indexes would be displayed first. + schema: + type: string + enum: + - asc + - desc + list.shards::path.index: + in: path + name: index + description: |- + A comma-separated list of data streams, indexes, and aliases used to limit the request. + Supports wildcards (`*`). + To target all data streams and indexes, omit this parameter or use `*` or `_all`. + required: true + schema: + $ref: '../schemas/_common.yaml#/components/schemas/Indices' + style: simple + list.shards::query.bytes: + in: query + name: bytes + description: The unit used to display byte values. + schema: + $ref: '../schemas/_common.yaml#/components/schemas/ByteUnit' + style: form + list.shards::query.cluster_manager_timeout: + name: cluster_manager_timeout + in: query + description: Operation timeout for connection to cluster-manager node. + schema: + $ref: '../schemas/_common.yaml#/components/schemas/Duration' + x-version-added: '2.0' + list.shards::query.format: + name: format + in: query + description: A short version of the Accept header, such as `JSON`, `YAML`. + schema: + type: string + description: A short version of the Accept header, such as `JSON`, `YAML`. + list.shards::query.h: + name: h + in: query + description: Comma-separated list of column names to display. + style: form + schema: + type: array + items: + type: string + description: Comma-separated list of column names to display. + explode: true + list.shards::query.help: + name: help + in: query + description: Return help information. + schema: + type: boolean + default: false + description: Return help information. + list.shards::query.local: + name: local + in: query + description: Return local information, do not retrieve the state from cluster-manager node. + schema: + type: boolean + default: false + description: Return local information, do not retrieve the state from cluster-manager node. + list.shards::query.master_timeout: + name: master_timeout + in: query + description: Operation timeout for connection to cluster manager node. + schema: + $ref: '../schemas/_common.yaml#/components/schemas/Duration' + x-version-deprecated: '2.0' + x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. + deprecated: true + list.shards::query.s: + name: s + in: query + description: Comma-separated list of column names or column aliases to sort by. + style: form + schema: + type: array + items: + type: string + description: Comma-separated list of column names or column aliases to sort by. + explode: true + list.shards::query.time: + name: time + in: query + description: The unit in which to display time values. + schema: + $ref: '../schemas/_common.yaml#/components/schemas/TimeUnit' + list.shards::query.v: + name: v + in: query + description: Verbose mode. Display column headers. + schema: + type: boolean + default: false + description: Verbose mode. Display column headers. + list.shards::query.next_token: + name: next_token + in: query + description: Token to retrieve next page of shards. + schema: + type: ['null', string] + description: Token to retrieve next page of shards. + list.shards::query.size: + name: size + in: query + description: Maximum number of shards to be displayed in a page. + schema: + type: integer + format: int32 + list.shards::query.sort: + name: sort + in: query + description: Defines order in which shards will be displayed. Accepted values are `asc` and `desc`. If `desc`, most recently created shards would be displayed first. + schema: + type: string + enum: + - asc + - desc \ No newline at end of file diff --git a/tests/default/list/indices.yaml b/tests/default/list/indices.yaml new file mode 100644 index 000000000..a1407f211 --- /dev/null +++ b/tests/default/list/indices.yaml @@ -0,0 +1,141 @@ +$schema: ../../../json_schemas/test_story.schema.yaml + +description: Test _list/indices endpoints. +# TODO: Re-enable in 3.0, see https://github.com/opensearch-project/opensearch-api-specification/pull/613 +version: '>= 2.18 < 3' +prologues: + - path: /{index} + method: PUT + parameters: + index: books + request: + payload: {} + - path: /{index} + method: PUT + parameters: + index: unassigned + wait_for_active_shards: 0 + request: + payload: + settings: + routing: + allocation: + require: + test: test +epilogues: + - path: /books + method: DELETE + status: [200, 404] + - path: /unassigned + method: DELETE + status: [200, 404] +chapters: + - synopsis: List information related to indexes (text/plain). + method: GET + path: /_list/indices + response: + status: 200 + content_type: text/plain + - synopsis: List information related to one index (text/plain). + method: GET + path: /_list/indices/{index} + parameters: + index: books + response: + status: 200 + content_type: text/plain + - synopsis: List information related to indexes with verbose output (v=true). + method: GET + path: /_list/indices + parameters: + v: true + response: + status: 200 + content_type: text/plain + - synopsis: List information related to indexes with headers (h=header1,header2). + method: GET + path: /_list/indices + parameters: + h: + - health + - status + response: + status: 200 + content_type: text/plain + - synopsis: List information related to indexes displaying all available headers (help=true). + method: GET + path: /_list/indices + parameters: + help: true + response: + status: 200 + content_type: text/plain + - synopsis: List information related to indexes with sorted results. + method: GET + path: /_list/indices + parameters: + s: + - status + response: + status: 200 + content_type: text/plain + - synopsis: List information related to indexes with bytes, time and all fields. + method: GET + path: /_list/indices + parameters: + format: json + bytes: b + time: s + h: + - '*' + response: + status: 200 + content_type: application/json + - synopsis: List information related to indexes with all fields. + method: GET + path: /_list/indices + parameters: + format: json + response: + status: 200 + content_type: application/json + - synopsis: List information related to indexes in different formats (format=json). + method: GET + path: /_list/indices + parameters: + format: json + response: + status: 200 + content_type: application/json + - synopsis: List information related to indexes in different formats (format=yaml). + method: GET + path: /_list/indices + parameters: + format: yaml + response: + status: 200 + content_type: application/yaml + - synopsis: List information related to indexes in different formats (format=cbor). + distributions: + excluded: + - amazon-managed + - amazon-serverless + method: GET + path: /_list/indices + parameters: + format: cbor + response: + status: 200 + content_type: application/cbor + - synopsis: List information related to indexes in different formats (format=smile). + distributions: + excluded: + - amazon-managed + - amazon-serverless + method: GET + path: /_list/indices + parameters: + format: smile + response: + status: 200 + content_type: application/smile diff --git a/tests/default/list/shards.yaml b/tests/default/list/shards.yaml new file mode 100644 index 000000000..768804c8a --- /dev/null +++ b/tests/default/list/shards.yaml @@ -0,0 +1,51 @@ +$schema: ../../../json_schemas/test_story.schema.yaml + +description: Test list/shards endpoints. +# TODO: Re-enable in 3.0, see https://github.com/opensearch-project/opensearch-api-specification/pull/613 +version: '>= 2.18 < 3' +prologues: + - path: /{index} + method: PUT + parameters: + index: games + - path: /{index} + method: PUT + parameters: + index: unassigned + wait_for_active_shards: 0 + request: + payload: + settings: + routing: + allocation: + require: + test: test +epilogues: + - path: /games + method: DELETE + status: [200, 404] + - path: /unassigned + method: DELETE + status: [200, 404] +chapters: + - synopsis: List the state of all primary and replica shards and how they are distributed. + path: /_list/shards + method: GET + parameters: + format: json + h: + - '*' + - synopsis: List the state of all primary and replica shards and how they are distributed for an index. + path: /_list/shards/{index} + method: GET + parameters: + format: json + index: + - games + bytes: kb + local: true + time: s + h: + - '*' + response: + status: 200 From a3b18042c6c1554f3713b42a2cec38bcd2e63040 Mon Sep 17 00:00:00 2001 From: "Daniel (dB.) Doubrovkine" Date: Mon, 11 Nov 2024 16:29:50 -0500 Subject: [PATCH 02/16] Fix: include .yml files when preparing for Vale. (#660) Signed-off-by: dblock --- tools/src/prepare-for-vale/KeepDescriptions.ts | 2 +- .../tests/prepare-for-vale/KeepDescriptions.test.ts | 2 +- .../prepare-for-vale/fixtures/docker-compose.txt | 11 +++++++++++ .../prepare-for-vale/fixtures/docker-compose.yaml | 12 ++++++++++++ 4 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 tools/tests/prepare-for-vale/fixtures/docker-compose.txt create mode 100644 tools/tests/prepare-for-vale/fixtures/docker-compose.yaml diff --git a/tools/src/prepare-for-vale/KeepDescriptions.ts b/tools/src/prepare-for-vale/KeepDescriptions.ts index 6d6da3ae2..8995f8df5 100644 --- a/tools/src/prepare-for-vale/KeepDescriptions.ts +++ b/tools/src/prepare-for-vale/KeepDescriptions.ts @@ -25,7 +25,7 @@ export default class KeepDescriptions { process(): void { this.root_folder - const files = fg.globSync([`${this.root_folder}/**/*.yaml`]) + const files = fg.globSync([`${this.root_folder}/**/*.{yaml,yml}`]) files.forEach((path) => { this.logger.log(path) this.process_file(path) diff --git a/tools/tests/prepare-for-vale/KeepDescriptions.test.ts b/tools/tests/prepare-for-vale/KeepDescriptions.test.ts index 0c595299b..52f2a9790 100644 --- a/tools/tests/prepare-for-vale/KeepDescriptions.test.ts +++ b/tools/tests/prepare-for-vale/KeepDescriptions.test.ts @@ -15,7 +15,7 @@ import tmp from 'tmp' describe('KeepDescriptions', () => { var temp: tmp.DirResult var fixture_path: string = './tools/tests/prepare-for-vale/fixtures' - var fixtures = fg.globSync(`${fixture_path}/**/*.yaml`) + var fixtures = fg.globSync(`${fixture_path}/**/*.{yaml,yml}`) describe('defaults', () => { beforeAll(() => { diff --git a/tools/tests/prepare-for-vale/fixtures/docker-compose.txt b/tools/tests/prepare-for-vale/fixtures/docker-compose.txt new file mode 100644 index 000000000..1dac6def4 --- /dev/null +++ b/tools/tests/prepare-for-vale/fixtures/docker-compose.txt @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/tools/tests/prepare-for-vale/fixtures/docker-compose.yaml b/tools/tests/prepare-for-vale/fixtures/docker-compose.yaml new file mode 100644 index 000000000..04c267ec5 --- /dev/null +++ b/tools/tests/prepare-for-vale/fixtures/docker-compose.yaml @@ -0,0 +1,12 @@ +version: '3' + +services: + opensearch-cluster: + image: ${OPENSEARCH_DOCKER_HUB_PROJECT:-opensearchproject}/opensearch:${OPENSEARCH_VERSION:-latest}${OPENSEARCH_DOCKER_REF} + ports: + - 9200:9200 + - 9600:9600 + environment: + - OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_PASSWORD:-myStrongPassword123!} + - OPENSEARCH_JAVA_OPTS=${OPENSEARCH_JAVA_OPTS} + - discovery.type=single-node From 0d5f7126d6d08f5c4f562fe256dd810445f293a3 Mon Sep 17 00:00:00 2001 From: "Daniel (dB.) Doubrovkine" Date: Mon, 11 Nov 2024 16:44:38 -0500 Subject: [PATCH 03/16] Fix: merging coverage includes plugin tests. (#662) * Fix: merging coverage includes plugin tests. Signed-off-by: dblock * Display missing test paths. Signed-off-by: dblock --------- Signed-off-by: dblock --- .github/workflows/test-spec.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-spec.yml b/.github/workflows/test-spec.yml index 3729b66cb..015fd79dc 100644 --- a/.github/workflows/test-spec.yml +++ b/.github/workflows/test-spec.yml @@ -77,12 +77,16 @@ jobs: working-directory: tests/${{ matrix.entry.tests || 'default' }} run: docker compose up -d + - name: Generate Test Files Hash + id: tests + run: echo "hash=${{ matrix.entry.version }}-${{ hashFiles(format('tests/{0}', matrix.entry.tests || 'default')) }}" >> $GITHUB_OUTPUT + - name: Run Tests run: | npm run test:spec -- \ --opensearch-insecure \ --opensearch-version=${{ matrix.entry.version }} \ - --coverage coverage/test-spec-coverage-${{ matrix.entry.version }}-${{ matrix.entry.tests || 'default' }}.json \ + --coverage coverage/test-spec-coverage-${{ steps.tests.outputs.hash }}.json \ --tests=tests/${{ matrix.entry.tests || 'default' }} - name: Get Container Logs @@ -96,8 +100,8 @@ jobs: - name: Upload Test Coverage Results uses: actions/upload-artifact@v4 with: - name: coverage-${{ matrix.entry.version }}-${{ hashFiles(format('tests/{0}', matrix.entry.tests || 'default')) }} - path: coverage/test-spec-coverage-${{ matrix.entry.version }}-${{ matrix.entry.tests || 'default' }}.json + name: coverage-${{ matrix.entry.version }}-${{ steps.tests.outputs.hash }} + path: coverage/test-spec-coverage-${{ steps.tests.outputs.hash }}.json merge-coverage: runs-on: ubuntu-latest @@ -111,6 +115,17 @@ jobs: with: path: coverage + - name: Display Missing Test Paths + run: | + jq -sc ' + (map(.operations) | add | unique) as $all | + (map(.evaluated_operations) | add | unique) as $evaluated | + $all-$evaluated | + sort_by(.path) | + .[] | + "\(.method) \(.path)" + ' $(find ./ -name "test-spec-coverage-*.json") + - name: Combine Test Coverage Data shell: bash -eo pipefail {0} run: | From 9aa52da61ea021baa2ed148043477b9f83462b74 Mon Sep 17 00:00:00 2001 From: "Daniel (dB.) Doubrovkine" Date: Mon, 11 Nov 2024 23:09:37 -0500 Subject: [PATCH 04/16] Added FlatObjectProperty. (#661) Signed-off-by: dblock --- CHANGELOG.md | 1 + spec/schemas/_common.mapping.yaml | 16 +++++++++++ tests/default/_core/mapping.yaml | 47 +------------------------------ 3 files changed, 18 insertions(+), 46 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e455a6d4f..47df345f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Added Python and Ruby spec validators ([#646](https://github.com/opensearch-project/opensearch-api-specification/pull/646)) - Added verbose output of the story being evaluated ([#646](https://github.com/opensearch-project/opensearch-api-specification/pull/646)) - Added `_search` with `sort: direction` ([#658](https://github.com/opensearch-project/opensearch-api-specification/pull/658)) +- Added `_common.mapping:FlatObjectProperty` ([#661](https://github.com/opensearch-project/opensearch-api-specification/pull/661)) ### 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/schemas/_common.mapping.yaml b/spec/schemas/_common.mapping.yaml index 6523b2143..9e2bc2c5f 100644 --- a/spec/schemas/_common.mapping.yaml +++ b/spec/schemas/_common.mapping.yaml @@ -128,6 +128,7 @@ components: - $ref: '#/components/schemas/DenseVectorProperty' - $ref: '#/components/schemas/SparseVectorProperty' - $ref: '#/components/schemas/FlattenedProperty' + - $ref: '#/components/schemas/FlatObjectProperty' - $ref: '#/components/schemas/NestedProperty' - $ref: '#/components/schemas/ObjectProperty' - $ref: '#/components/schemas/CompletionProperty' @@ -614,6 +615,21 @@ components: - flattened required: - type + FlatObjectProperty: + allOf: + - $ref: '#/components/schemas/PropertyBase' + - type: object + properties: + searchable: + type: boolean + aggregatable: + type: boolean + type: + type: string + enum: + - flat_object + required: + - type NestedProperty: allOf: - $ref: '#/components/schemas/CorePropertyBase' diff --git a/tests/default/_core/mapping.yaml b/tests/default/_core/mapping.yaml index 29c2c335d..586e3a569 100644 --- a/tests/default/_core/mapping.yaml +++ b/tests/default/_core/mapping.yaml @@ -1,54 +1,9 @@ $schema: ../../../json_schemas/test_story.schema.yaml description: Test mappings endpoints. -prologues: - - path: /{index} - method: PUT - parameters: - index: movies - request: - payload: - mappings: - properties: - director: - type: text - year: - type: integer - location: - type: ip - ignore_malformed: true -epilogues: - - path: /movies - method: DELETE - status: [200, 404] chapters: - - synopsis: Get mappings for an index (index in query). + - synopsis: Get all mappings. path: /_mapping method: GET - parameters: - index: movies response: status: 200 - payload: - movies: - mappings: - properties: - director: - type: text - year: - type: integer - - synopsis: Get mappings for an index (index in path). - path: /{index}/_mapping - method: GET - parameters: - index: movies - response: - status: 200 - payload: - movies: - mappings: - properties: - director: - type: text - year: - type: integer \ No newline at end of file From ed5e83c5b54158c2564e9ebe18e162eec1ec53ca Mon Sep 17 00:00:00 2001 From: "Daniel (dB.) Doubrovkine" Date: Tue, 12 Nov 2024 15:05:29 -0500 Subject: [PATCH 05/16] Upgrade to 2.18.0 GA. (#665) Signed-off-by: dblock --- .github/workflows/test-spec.yml | 22 +++++++++---------- tests/default/cat/fielddata.yaml | 4 ++-- .../streaming/indices/bulk/stream.yaml | 4 +--- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/.github/workflows/test-spec.yml b/.github/workflows/test-spec.yml index 015fd79dc..1207af832 100644 --- a/.github/workflows/test-spec.yml +++ b/.github/workflows/test-spec.yml @@ -27,26 +27,26 @@ jobs: admin_password: admin - version: 2.0.0 admin_password: admin - - version: 2.16.0 - - version: 2.16.0 + - version: 2.18.0 + - version: 2.18.0 tests: plugins/index_state_management - - version: 2.16.0 + - version: 2.18.0 tests: plugins/ml - - version: 2.16.0 + - version: 2.18.0 tests: routing - - version: 2.16.0 + - version: 2.18.0 tests: snapshot - - version: 2.17.0 + - version: 2.18.0 tests: plugins/streaming - - version: 2.17.0 + - version: 2.18.0 tests: plugins/notifications - - version: 2.17.0 + - version: 2.18.0 tests: plugins/query_insights - - version: 2.17.0 - tests: plugins/workload-management - version: 2.18.0 + tests: plugins/workload-management + - version: 2.19.0 hub: opensearchstaging - ref: '@sha256:57a1cd1142d68c203e2e4aa0666d9a691e1e409a5d14aa4a8f5044036f05cf06' + ref: '@sha256:4da23e0137b2b67206d23b36fcf0914cc39b3bf19310c782f536e4934b86f6cc' - version: 3.0.0 hub: opensearchstaging ref: '@sha256:727643acdfebed77bfdb26362dbcff536b7ea02a0cc4ae2da2521729171333de' diff --git a/tests/default/cat/fielddata.yaml b/tests/default/cat/fielddata.yaml index b5b27a84f..164b78950 100644 --- a/tests/default/cat/fielddata.yaml +++ b/tests/default/cat/fielddata.yaml @@ -10,7 +10,7 @@ chapters: response: status: 200 - synopsis: List the memory size used by each field per node with data from security-analytics. - version: '>= 2.4' + version: '>= 2.4 < 2.19' path: /_cat/fielddata method: GET parameters: @@ -21,7 +21,7 @@ chapters: payload: - field: log_types - synopsis: List the memory size used by each field per node with data from security-analytics. - version: '>= 2.4' + version: '>= 2.4 < 2.19' path: /_cat/fielddata/{fields} method: GET parameters: diff --git a/tests/plugins/streaming/indices/bulk/stream.yaml b/tests/plugins/streaming/indices/bulk/stream.yaml index 546d77b63..6ad5cc603 100644 --- a/tests/plugins/streaming/indices/bulk/stream.yaml +++ b/tests/plugins/streaming/indices/bulk/stream.yaml @@ -1,13 +1,13 @@ $schema: ../../../../../json_schemas/test_story.schema.yaml description: Test bulk streaming index endpoint. +version: '>= 2.17' epilogues: - path: /books,movies method: DELETE status: [200, 404] chapters: - synopsis: Create an index. - version: '2.17' path: /{index}/_bulk/stream method: POST parameters: @@ -18,7 +18,6 @@ chapters: - {create: {}} - {director: Bennett Miller, title: Moneyball, year: 2011} - synopsis: Delete document in an index. - version: '>= 2.17' path: /{index}/_bulk/stream method: PUT parameters: @@ -38,7 +37,6 @@ chapters: result: not_found status: 404 - synopsis: Bulk index document CRUD. - version: '>= 2.17' method: POST path: /{index}/_bulk/stream parameters: From fce5721d72c946a7bf642a507ad1394984048039 Mon Sep 17 00:00:00 2001 From: "Daniel (dB.) Doubrovkine" Date: Tue, 12 Nov 2024 17:01:44 -0500 Subject: [PATCH 06/16] Added tests for missing alias/aliases combinations. (#664) Signed-off-by: dblock --- tests/default/indices/alias/alias.yaml | 27 +++++++++++++++++++++- tests/default/indices/aliases/aliases.yaml | 11 ++++++++- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/tests/default/indices/alias/alias.yaml b/tests/default/indices/alias/alias.yaml index 4000dbb13..4be447727 100644 --- a/tests/default/indices/alias/alias.yaml +++ b/tests/default/indices/alias/alias.yaml @@ -12,11 +12,28 @@ prologues: index: games chapters: - synopsis: Create an alias. + path: /{index}/_alias/{name} + method: POST + parameters: + index: games + name: jeux + - synopsis: Update an alias. path: /{index}/_alias/{name} method: PUT parameters: index: games name: jeux + - synopsis: Get all aliases from an index. + method: GET + path: /{index}/_alias + parameters: + index: games + response: + status: 200 + payload: + games: + aliases: + jeux: {} - synopsis: Get an alias from index. method: GET path: /{index}/_alias/{name} @@ -25,7 +42,6 @@ chapters: name: jeux response: status: 200 - content_type: application/json payload: games: aliases: @@ -42,6 +58,15 @@ chapters: parameters: index: games name: jeux + - synopsis: Update an alias. + path: /{index}/_alias + method: PUT + parameters: + index: games + request: + payload: + alias: jeux + is_write_index: false - synopsis: Check if alias exists. path: /{index}/_alias/{name} method: HEAD diff --git a/tests/default/indices/aliases/aliases.yaml b/tests/default/indices/aliases/aliases.yaml index 75a1918c1..503188143 100644 --- a/tests/default/indices/aliases/aliases.yaml +++ b/tests/default/indices/aliases/aliases.yaml @@ -9,12 +9,21 @@ prologues: - path: games method: PUT chapters: - - synopsis: Create an alias. + - synopsis: Create an alias by name. path: /{index}/_aliases/{name} method: PUT parameters: index: games name: jeux + - synopsis: Update an alias. + path: /{index}/_aliases + method: PUT + parameters: + index: games + request: + payload: + alias: jeux + is_write_index: false - synopsis: Delete an alias. path: /{index}/_aliases/{name} method: DELETE From 52f8e2ce2c79dab6b2b210bb0c4c88019724c980 Mon Sep 17 00:00:00 2001 From: "Daniel (dB.) Doubrovkine" Date: Wed, 13 Nov 2024 14:51:38 -0500 Subject: [PATCH 07/16] Run merge coverage on push. (#668) Signed-off-by: dblock --- .github/workflows/test-spec.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-spec.yml b/.github/workflows/test-spec.yml index 1207af832..03e9b9cb6 100644 --- a/.github/workflows/test-spec.yml +++ b/.github/workflows/test-spec.yml @@ -105,7 +105,6 @@ jobs: merge-coverage: runs-on: ubuntu-latest - if: github.event_name == 'pull_request' needs: test-opensearch-spec steps: - uses: actions/checkout@v4 @@ -141,6 +140,7 @@ jobs: cat ./coverage/coverage.json - name: Construct Comment Data Payload + if: github.event_name == 'pull_request' shell: bash -eo pipefail {0} run: | jq \ @@ -161,6 +161,7 @@ jobs: - name: Upload PR Comment Payload uses: actions/upload-artifact@v4 + if: github.event_name == 'pull_request' with: name: pr-comment path: pr-comment.json From 2cdd46a18f5c52e5e11765e1939f6214d71aa1fa Mon Sep 17 00:00:00 2001 From: "Daniel (dB.) Doubrovkine" Date: Wed, 13 Nov 2024 14:53:04 -0500 Subject: [PATCH 08/16] Corrected /{index}/_create/{id} 201 response. (#669) Signed-off-by: dblock --- CHANGELOG.md | 1 + spec/namespaces/_core.yaml | 10 +++++----- tests/default/indices/create.yaml | 32 +++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 tests/default/indices/create.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md index 47df345f2..d24b75f3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Fixed incorrect `style` in `indices.get_mapping::query.index` ([#646](https://github.com/opensearch-project/opensearch-api-specification/pull/646)) - Removed invalid `required` from `ppl` responses ([#646](https://github.com/opensearch-project/opensearch-api-specification/pull/646)) - Added schema for security API error responses ([#646](https://github.com/opensearch-project/opensearch-api-specification/pull/646)) +- Fixed `/{index}/_create/{id}` returning `201` ([#669](https://github.com/opensearch-project/opensearch-api-specification/pull/669)) ## [0.1.0] - 2024-10-25 diff --git a/spec/namespaces/_core.yaml b/spec/namespaces/_core.yaml index af76fa7e3..fafc809b3 100644 --- a/spec/namespaces/_core.yaml +++ b/spec/namespaces/_core.yaml @@ -1241,8 +1241,8 @@ paths: requestBody: $ref: '#/components/requestBodies/create' responses: - '200': - $ref: '#/components/responses/create@200' + '201': + $ref: '#/components/responses/create@201' put: operationId: create.1 x-operation-group: create @@ -1266,8 +1266,8 @@ paths: requestBody: $ref: '#/components/requestBodies/create' responses: - '200': - $ref: '#/components/responses/create@200' + '201': + $ref: '#/components/responses/create@201' /{index}/_delete_by_query: post: operationId: delete_by_query.0 @@ -2834,7 +2834,7 @@ components: required: - _shards - count - create@200: + create@201: content: application/json: schema: diff --git a/tests/default/indices/create.yaml b/tests/default/indices/create.yaml new file mode 100644 index 000000000..b002fadfe --- /dev/null +++ b/tests/default/indices/create.yaml @@ -0,0 +1,32 @@ +$schema: ../../../json_schemas/test_story.schema.yaml + +description: Test inserting and retrieving a doc. +epilogues: + - path: /movies + method: DELETE + status: [200, 404] +chapters: + - synopsis: Create a document it doesn't already exist (POST). + path: /{index}/_create/{id} + method: POST + parameters: + index: movies + id: '1' + request: + payload: + title: Beauty and the Beast + year: 1991 + response: + status: 201 + - synopsis: Create a document it doesn't already exist (PUT). + path: /{index}/_create/{id} + method: PUT + parameters: + index: movies + id: '2' + request: + payload: + title: To Kill a Mockingbird + year: 1960 + response: + status: 201 From a84cb99e68effa87f382881ec5372b4da9d9c174 Mon Sep 17 00:00:00 2001 From: "Daniel (dB.) Doubrovkine" Date: Wed, 13 Nov 2024 14:54:05 -0500 Subject: [PATCH 09/16] Added HEAD /{index}/_doc/{id} 404 response. (#670) Signed-off-by: dblock --- CHANGELOG.md | 1 + spec/namespaces/_core.yaml | 5 +++++ tests/default/indices/doc.yaml | 16 ++++++++++++++++ 3 files changed, 22 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d24b75f3f..886986786 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Added verbose output of the story being evaluated ([#646](https://github.com/opensearch-project/opensearch-api-specification/pull/646)) - Added `_search` with `sort: direction` ([#658](https://github.com/opensearch-project/opensearch-api-specification/pull/658)) - Added `_common.mapping:FlatObjectProperty` ([#661](https://github.com/opensearch-project/opensearch-api-specification/pull/661)) +- Added `HEAD /{index}/_doc/{id}` returning `404` ([#670](https://github.com/opensearch-project/opensearch-api-specification/pull/670)) ### 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/_core.yaml b/spec/namespaces/_core.yaml index fafc809b3..542d55bf2 100644 --- a/spec/namespaces/_core.yaml +++ b/spec/namespaces/_core.yaml @@ -1393,6 +1393,8 @@ paths: responses: '200': $ref: '#/components/responses/exists@200' + '404': + $ref: '#/components/responses/exists@404' post: operationId: index.1 x-operation-group: index @@ -2905,6 +2907,9 @@ components: exists@200: content: application/json: {} + exists@404: + content: + application/json: {} exists_source@200: content: application/json: {} diff --git a/tests/default/indices/doc.yaml b/tests/default/indices/doc.yaml index 5396a52bf..714c773d4 100644 --- a/tests/default/indices/doc.yaml +++ b/tests/default/indices/doc.yaml @@ -49,6 +49,14 @@ chapters: id: '1' response: status: 200 + - synopsis: Check whether a document exists. + path: /{index}/_doc/{id} + method: HEAD + parameters: + index: movies + id: '1' + response: + status: 200 - synopsis: Delete a document. path: /{index}/_doc/{id} method: DELETE @@ -65,6 +73,14 @@ chapters: id: '1' response: status: 404 + - synopsis: Check whether a nonexistent document exists. + path: /{index}/_doc/{id} + method: HEAD + parameters: + index: movies + id: '1' + response: + status: 404 - synopsis: Delete a nonexistent document. path: /{index}/_doc/{id} method: DELETE From 0871d02d7490f9d55ec459d38c0250b12ff3aff7 Mon Sep 17 00:00:00 2001 From: "Daniel (dB.) Doubrovkine" Date: Wed, 13 Nov 2024 14:55:07 -0500 Subject: [PATCH 10/16] Remaining alias-related tests. (#667) * Added test for POST /{index}/_aliases/{name}. Signed-off-by: dblock * Added tests for POST /{alias}/_rollover/{new_index}. Signed-off-by: dblock --------- Signed-off-by: dblock --- tests/default/indices/alias/rollover.yaml | 29 +++++++++++++++++++ tests/default/indices/aliases/aliases.yaml | 11 ++++++- .../default/indices/data_stream/rollover.yaml | 2 -- 3 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 tests/default/indices/alias/rollover.yaml diff --git a/tests/default/indices/alias/rollover.yaml b/tests/default/indices/alias/rollover.yaml new file mode 100644 index 000000000..740a06357 --- /dev/null +++ b/tests/default/indices/alias/rollover.yaml @@ -0,0 +1,29 @@ +$schema: ../../../../json_schemas/test_story.schema.yaml + +description: Test rolling over aliases. +epilogues: + - path: /games + method: DELETE + status: [200, 404] + - path: /rollover + method: DELETE + status: [200, 404] +prologues: + - path: games + method: PUT + - path: /games/_alias/jeux + method: POST +chapters: + - synopsis: Manually roll over an index. + path: /{alias}/_rollover/{new_index} + method: POST + parameters: + alias: jeux + new_index: rollover + response: + status: 200 + payload: + acknowledged: true + old_index: games + new_index: rollover + rolled_over: true diff --git a/tests/default/indices/aliases/aliases.yaml b/tests/default/indices/aliases/aliases.yaml index 503188143..6f9850a84 100644 --- a/tests/default/indices/aliases/aliases.yaml +++ b/tests/default/indices/aliases/aliases.yaml @@ -10,12 +10,21 @@ prologues: method: PUT chapters: - synopsis: Create an alias by name. + path: /{index}/_aliases/{name} + method: POST + parameters: + index: games + name: jeux + - synopsis: Update an alias by name (query). path: /{index}/_aliases/{name} method: PUT parameters: index: games name: jeux - - synopsis: Update an alias. + request: + payload: + is_write_index: true + - synopsis: Update an alias by name (payload). path: /{index}/_aliases method: PUT parameters: diff --git a/tests/default/indices/data_stream/rollover.yaml b/tests/default/indices/data_stream/rollover.yaml index 5e0c637be..853a9ea14 100644 --- a/tests/default/indices/data_stream/rollover.yaml +++ b/tests/default/indices/data_stream/rollover.yaml @@ -30,8 +30,6 @@ epilogues: status: [200, 404] chapters: - synopsis: Manually roll over a data stream. - warnings: - multiple-paths-detected: false path: /{alias}/_rollover method: POST parameters: From 6065144facfe421434aaf2d5801623a06786bb43 Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Thu, 14 Nov 2024 10:33:17 +1300 Subject: [PATCH 11/16] Correct index mapping types (#666) * Correct index mapping types Signed-off-by: Thomas Farr * Add PR number Signed-off-by: Thomas Farr * Correct numeric types Signed-off-by: Thomas Farr * Specify default Property variant Signed-off-by: Thomas Farr * Add test for icu_collation_keyword Signed-off-by: Thomas Farr * Rename test folder Signed-off-by: Thomas Farr --------- Signed-off-by: Thomas Farr --- .github/workflows/test-spec.yml | 2 + CHANGELOG.md | 4 + spec/namespaces/indices.yaml | 4 +- spec/schemas/_common.mapping.yaml | 158 +++++------------- spec/schemas/_core.field_caps.yaml | 19 --- spec/schemas/indices._common.yaml | 12 +- tests/plugins/analysis/Dockerfile | 6 + tests/plugins/analysis/docker-compose.yml | 17 ++ .../mapping/icu_collation_keyword.yaml | 86 ++++++++++ 9 files changed, 163 insertions(+), 145 deletions(-) create mode 100644 tests/plugins/analysis/Dockerfile create mode 100644 tests/plugins/analysis/docker-compose.yml create mode 100644 tests/plugins/analysis/indices/mapping/icu_collation_keyword.yaml diff --git a/.github/workflows/test-spec.yml b/.github/workflows/test-spec.yml index 03e9b9cb6..a6c1e78ec 100644 --- a/.github/workflows/test-spec.yml +++ b/.github/workflows/test-spec.yml @@ -44,6 +44,8 @@ jobs: tests: plugins/query_insights - version: 2.18.0 tests: plugins/workload-management + - version: 2.18.0 + tests: plugins/analysis - version: 2.19.0 hub: opensearchstaging ref: '@sha256:4da23e0137b2b67206d23b36fcf0914cc39b3bf19310c782f536e4934b86f6cc' diff --git a/CHANGELOG.md b/CHANGELOG.md index 886986786..05f3ba6b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,9 +11,13 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Added `_search` with `sort: direction` ([#658](https://github.com/opensearch-project/opensearch-api-specification/pull/658)) - Added `_common.mapping:FlatObjectProperty` ([#661](https://github.com/opensearch-project/opensearch-api-specification/pull/661)) - Added `HEAD /{index}/_doc/{id}` returning `404` ([#670](https://github.com/opensearch-project/opensearch-api-specification/pull/670)) +- Added `_common.mapping:IcuCollationKeywordProperty` ([#666](https://github.com/opensearch-project/opensearch-api-specification/pull/666)) ### 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)) +- Removed unsupported `_common.mapping:DenseVectorProperty`, `_common.mapping:SparseVectorProperty`, and `_common.mapping:FlattenedProperty` ([#666](https://github.com/opensearch-project/opensearch-api-specification/pull/666)) +- Removed unsupported time series dimension properties and types ([#666](https://github.com/opensearch-project/opensearch-api-specification/pull/666)) +- Removed unsupported runtime field properties (`script`/`on_script_error`) on `NumberPropertyBase` ([#666](https://github.com/opensearch-project/opensearch-api-specification/pull/666)) ### Fixed - Spec passes OpenAPI 3.1.0 validations ([#646](https://github.com/opensearch-project/opensearch-api-specification/pull/646)) diff --git a/spec/namespaces/indices.yaml b/spec/namespaces/indices.yaml index fcf676adf..cae77c601 100644 --- a/spec/namespaces/indices.yaml +++ b/spec/namespaces/indices.yaml @@ -2045,7 +2045,7 @@ components: The index template with the highest priority is chosen. If no priority is specified the template is treated as though it is of priority 0 (lowest priority). This number is not automatically generated by OpenSearch. - type: number + type: integer version: $ref: '../schemas/_common.yaml#/components/schemas/VersionNumber' _meta: @@ -2225,7 +2225,7 @@ components: The index template with the highest priority is chosen. If no priority is specified the template is treated as though it is of priority 0 (lowest priority). This number is not automatically generated by OpenSearch. - type: number + type: integer version: $ref: '../schemas/_common.yaml#/components/schemas/VersionNumber' _meta: diff --git a/spec/schemas/_common.mapping.yaml b/spec/schemas/_common.mapping.yaml index 9e2bc2c5f..12087d9ed 100644 --- a/spec/schemas/_common.mapping.yaml +++ b/spec/schemas/_common.mapping.yaml @@ -109,6 +109,7 @@ components: type: object discriminator: propertyName: type + x-default: object oneOf: - $ref: '#/components/schemas/BinaryProperty' - $ref: '#/components/schemas/BooleanProperty' @@ -125,9 +126,6 @@ components: - $ref: '#/components/schemas/DateNanosProperty' - $ref: '#/components/schemas/DateProperty' - $ref: '#/components/schemas/AggregateMetricDoubleProperty' - - $ref: '#/components/schemas/DenseVectorProperty' - - $ref: '#/components/schemas/SparseVectorProperty' - - $ref: '#/components/schemas/FlattenedProperty' - $ref: '#/components/schemas/FlatObjectProperty' - $ref: '#/components/schemas/NestedProperty' - $ref: '#/components/schemas/ObjectProperty' @@ -158,6 +156,7 @@ components: - $ref: '#/components/schemas/IpRangeProperty' - $ref: '#/components/schemas/LongRangeProperty' - $ref: '#/components/schemas/KnnVectorProperty' + - $ref: '#/components/schemas/IcuCollationKeywordProperty' BinaryProperty: allOf: - $ref: '#/components/schemas/DocValuesPropertyBase' @@ -227,19 +226,6 @@ components: - boolean required: - type - OnScriptError: - type: string - enum: - - continue - - fail - TimeSeriesMetricType: - type: string - enum: - - counter - - gauge - - histogram - - position - - summary IndexOptions: type: string enum: @@ -310,9 +296,6 @@ components: type: string split_queries_on_whitespace: type: boolean - time_series_dimension: - description: For internal use by OpenSearch only. Marks the field as a time series dimension. Defaults to false. - type: boolean type: type: string enum: @@ -535,86 +518,10 @@ components: type: array items: type: string - time_series_metric: - $ref: '#/components/schemas/TimeSeriesMetricType' required: - default_metric - metrics - type - DenseVectorProperty: - allOf: - - $ref: '#/components/schemas/PropertyBase' - - type: object - properties: - type: - type: string - enum: - - dense_vector - dims: - type: number - similarity: - type: string - index: - type: boolean - index_options: - $ref: '#/components/schemas/DenseVectorIndexOptions' - required: - - dims - - type - DenseVectorIndexOptions: - type: object - properties: - type: - type: string - m: - type: number - ef_construction: - type: number - required: - - ef_construction - - m - - type - SparseVectorProperty: - allOf: - - $ref: '#/components/schemas/PropertyBase' - - type: object - properties: - type: - type: string - enum: - - sparse_vector - required: - - type - FlattenedProperty: - allOf: - - $ref: '#/components/schemas/PropertyBase' - - type: object - properties: - boost: - type: number - format: double - depth_limit: - type: number - doc_values: - type: boolean - eager_global_ordinals: - type: boolean - index: - type: boolean - index_options: - $ref: '#/components/schemas/IndexOptions' - null_value: - type: string - similarity: - type: string - split_queries_on_whitespace: - type: boolean - type: - type: string - enum: - - flattened - required: - - type FlatObjectProperty: allOf: - $ref: '#/components/schemas/PropertyBase' @@ -751,13 +658,6 @@ components: type: boolean null_value: type: string - on_script_error: - $ref: '#/components/schemas/OnScriptError' - script: - $ref: '_common.yaml#/components/schemas/Script' - time_series_dimension: - description: For internal use by OpenSearch only. Marks the field as a time series dimension. Defaults to false. - type: boolean type: type: string enum: @@ -843,20 +743,22 @@ components: - type GeoOrientation: oneOf: + # eslint-disable yml/sort-sequence-values - title: left type: string enum: + - left - LEFT - clockwise - cw - - left - title: right type: string enum: + - right - RIGHT - - ccw - counterclockwise - - right + - ccw + # eslint-enable yml/sort-sequence-values GeoStrategy: type: string enum: @@ -927,15 +829,6 @@ components: type: boolean index: type: boolean - on_script_error: - $ref: '#/components/schemas/OnScriptError' - script: - $ref: '_common.yaml#/components/schemas/Script' - time_series_metric: - $ref: '#/components/schemas/TimeSeriesMetricType' - time_series_dimension: - description: For internal use by OpenSearch only. Marks the field as a time series dimension. Defaults to false. - type: boolean DoubleNumberProperty: allOf: - $ref: '#/components/schemas/NumberPropertyBase' @@ -1168,6 +1061,43 @@ components: required: - dimension - type + IcuCollationKeywordProperty: + allOf: + - $ref: '#/components/schemas/DocValuesPropertyBase' + - type: object + properties: + type: + type: string + enum: + - icu_collation_keyword + index: + type: boolean + null_value: + type: string + alternate: + $ref: '_common.analysis.yaml#/components/schemas/IcuCollationAlternate' + case_level: + type: boolean + case_first: + $ref: '_common.analysis.yaml#/components/schemas/IcuCollationCaseFirst' + decomposition: + $ref: '_common.analysis.yaml#/components/schemas/IcuCollationDecomposition' + hiragana_quaternary_mode: + type: boolean + numeric: + type: boolean + strength: + $ref: '_common.analysis.yaml#/components/schemas/IcuCollationStrength' + variable_top: + type: string + country: + type: string + language: + type: string + variant: + type: string + required: + - type MatchType: type: string enum: diff --git a/spec/schemas/_core.field_caps.yaml b/spec/schemas/_core.field_caps.yaml index 70b93d6d5..67d8b308c 100644 --- a/spec/schemas/_core.field_caps.yaml +++ b/spec/schemas/_core.field_caps.yaml @@ -28,25 +28,6 @@ components: metadata_field: description: Whether this field is registered as a metadata field. type: boolean - time_series_dimension: - description: Whether this field is used as a time series dimension. - type: boolean - time_series_metric: - $ref: '_common.mapping.yaml#/components/schemas/TimeSeriesMetricType' - non_dimension_indices: - description: |- - If this list is present in the response, then indexes not contained in the list have the - field marked as a dimension. Any indexes contained in the list are not marked as a dimension. - type: array - items: - $ref: '_common.yaml#/components/schemas/IndexName' - metric_conflicts_indices: - description: |- - The list of indexes in which this field is present if the indexes - don't have the same `time_series_metric` value for the field. - type: array - items: - $ref: '_common.yaml#/components/schemas/IndexName' required: - aggregatable - searchable diff --git a/spec/schemas/indices._common.yaml b/spec/schemas/indices._common.yaml index 10386d1ea..6135bd368 100644 --- a/spec/schemas/indices._common.yaml +++ b/spec/schemas/indices._common.yaml @@ -148,8 +148,6 @@ components: $ref: '#/components/schemas/IndexSettingsAnalysis' settings: $ref: '#/components/schemas/IndexSettings' - time_series: - $ref: '#/components/schemas/IndexSettingsTimeSeries' queries: $ref: '#/components/schemas/IndexSettingsQueries' similarity: @@ -457,13 +455,6 @@ components: type: object additionalProperties: $ref: '_common.analysis.yaml#/components/schemas/Tokenizer' - IndexSettingsTimeSeries: - type: object - properties: - end_time: - $ref: '_common.yaml#/components/schemas/DateTime' - start_time: - $ref: '_common.yaml#/components/schemas/DateTime' IndexSettingsQueries: type: object properties: @@ -919,7 +910,8 @@ components: The index template with the highest priority is chosen. If no priority is specified the template is treated as though it is of priority 0 (lowest priority). This number is not automatically generated by OpenSearch. - type: number + type: integer + format: int64 _meta: $ref: '_common.yaml#/components/schemas/Metadata' allow_auto_create: diff --git a/tests/plugins/analysis/Dockerfile b/tests/plugins/analysis/Dockerfile new file mode 100644 index 000000000..aa43b705b --- /dev/null +++ b/tests/plugins/analysis/Dockerfile @@ -0,0 +1,6 @@ +ARG OPENSEARCH_DOCKER_HUB_PROJECT +ARG OPENSEARCH_VERSION +ARG OPENSEARCH_DOCKER_REF + +FROM ${OPENSEARCH_DOCKER_HUB_PROJECT}/opensearch:${OPENSEARCH_VERSION}${OPENSEARCH_DOCKER_REF} +RUN ./bin/opensearch-plugin install -b analysis-icu diff --git a/tests/plugins/analysis/docker-compose.yml b/tests/plugins/analysis/docker-compose.yml new file mode 100644 index 000000000..0f4c7da5d --- /dev/null +++ b/tests/plugins/analysis/docker-compose.yml @@ -0,0 +1,17 @@ +version: '3' + +services: + opensearch-cluster: + build: + context: . + args: + - OPENSEARCH_DOCKER_HUB_PROJECT=${OPENSEARCH_DOCKER_HUB_PROJECT:-opensearchproject} + - OPENSEARCH_DOCKER_REF=${OPENSEARCH_DOCKER_REF} + - OPENSEARCH_VERSION=${OPENSEARCH_VERSION:-latest} + ports: + - 9200:9200 + - 9600:9600 + environment: + - OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_PASSWORD:-myStrongPassword123!} + - OPENSEARCH_JAVA_OPTS=${OPENSEARCH_JAVA_OPTS} + - discovery.type=single-node diff --git a/tests/plugins/analysis/indices/mapping/icu_collation_keyword.yaml b/tests/plugins/analysis/indices/mapping/icu_collation_keyword.yaml new file mode 100644 index 000000000..1b4d78dda --- /dev/null +++ b/tests/plugins/analysis/indices/mapping/icu_collation_keyword.yaml @@ -0,0 +1,86 @@ +$schema: ../../../../../json_schemas/test_story.schema.yaml + +description: Test mappings endpoints. +warnings: + multiple-paths-detected: false +prologues: [] +epilogues: + - path: /collated + method: DELETE + status: [200, 404] +chapters: + - synopsis: Create an index with a mapping that uses ICU collation. + path: /{index} + method: PUT + parameters: + index: collated + request: + payload: + mappings: + properties: + phrase: + type: icu_collation_keyword + language: tr + strength: primary + + - synopsis: Get mappings for index. + path: /{index}/_mapping + method: GET + parameters: + index: collated + response: + status: 200 + payload: + collated: + mappings: + properties: + phrase: + type: icu_collation_keyword + language: tr + strength: primary + + - synopsis: Index values with ICU collation. + path: /{index}/_bulk + method: POST + parameters: + index: collated + refresh: wait_for + request: + content_type: application/x-ndjson + payload: + - {create: {_id: '1'}} + # eslint-disable-next-line @cspell/spellchecker + - {phrase: I WİLL USE TURKİSH CASING} + - {create: {_id: '2'}} + # eslint-disable-next-line @cspell/spellchecker + - {phrase: ı will use turkish casıng} + + - synopsis: Search for values with ICU collation. + path: /{index}/_search + method: POST + parameters: + index: collated + request: + payload: + query: + term: + # eslint-disable-next-line @cspell/spellchecker + phrase: I WİLL USE TURKİSH CASING + sort: + - phrase + - {_id: desc} + response: + status: 200 + payload: + hits: + total: + value: 2 + hits: + - _id: '2' + _source: + # eslint-disable-next-line @cspell/spellchecker + phrase: ı will use turkish casıng + - _id: '1' + _source: + # eslint-disable-next-line @cspell/spellchecker + phrase: I WİLL USE TURKİSH CASING From 6bb1fed0a2c7cf094a5ecfdb01f0306a4b9f8eba Mon Sep 17 00:00:00 2001 From: SwethaGuptha <156877431+SwethaGuptha@users.noreply.github.com> Date: Thu, 14 Nov 2024 03:04:06 +0530 Subject: [PATCH 12/16] Add spec for cluster stats metric and index_metric filter path. (#639) Signed-off-by: Swetha Guptha Co-authored-by: Swetha Guptha --- CHANGELOG.md | 1 + spec/namespaces/cluster.yaml | 54 +++++++++++++++++++ spec/schemas/cluster.stats.yaml | 52 +++++++++--------- tests/default/cluster/stats/index_metric.yaml | 18 +++++++ tests/default/cluster/stats/metric.yaml | 17 ++++++ 5 files changed, 117 insertions(+), 25 deletions(-) create mode 100644 tests/default/cluster/stats/index_metric.yaml create mode 100644 tests/default/cluster/stats/metric.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md index 05f3ba6b2..5b912b2fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -135,6 +135,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Added API spec for `adjust_pure_negative` for bool queries ([#641](https://github.com/opensearch-project/opensearch-api-specification/pull/641)) - Added a spec style checker [#620](https://github.com/opensearch-project/opensearch-api-specification/pull/620). - Added `remote_store` to node `Stats` ([#643](https://github.com/opensearch-project/opensearch-api-specification/pull/643)) +- Added `/_cluster/stats/{metric}/nodes/{node_id}` and `/_cluster/stats/{metric}/{index_metric}/nodes/{node_id}` ([#639](https://github.com/opensearch-project/opensearch-api-specification/pull/639)) ### Changed diff --git a/spec/namespaces/cluster.yaml b/spec/namespaces/cluster.yaml index 8820d2eda..d8bc97d90 100644 --- a/spec/namespaces/cluster.yaml +++ b/spec/namespaces/cluster.yaml @@ -331,6 +331,39 @@ paths: responses: '200': $ref: '#/components/responses/cluster.stats@200' + /_cluster/stats/{metric}/nodes/{node_id}: + get: + operationId: cluster.stats.2 + x-operation-group: cluster.stats + x-version-added: '2.18' + description: Returns high-level overview of cluster statistics. + externalDocs: + url: https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-stats/ + parameters: + - $ref: '#/components/parameters/cluster.stats::path.metric' + - $ref: '#/components/parameters/cluster.stats::path.node_id' + - $ref: '#/components/parameters/cluster.stats::query.flat_settings' + - $ref: '#/components/parameters/cluster.stats::query.timeout' + responses: + '200': + $ref: '#/components/responses/cluster.stats@200' + /_cluster/stats/{metric}/{index_metric}/nodes/{node_id}: + get: + operationId: cluster.stats.3 + x-operation-group: cluster.stats + x-version-added: '2.18' + description: Returns high-level overview of cluster statistics. + externalDocs: + url: https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-stats/ + parameters: + - $ref: '#/components/parameters/cluster.stats::path.index_metric' + - $ref: '#/components/parameters/cluster.stats::path.metric' + - $ref: '#/components/parameters/cluster.stats::path.node_id' + - $ref: '#/components/parameters/cluster.stats::query.flat_settings' + - $ref: '#/components/parameters/cluster.stats::query.timeout' + responses: + '200': + $ref: '#/components/responses/cluster.stats@200' /_cluster/voting_config_exclusions: post: operationId: cluster.post_voting_config_exclusions.0 @@ -1380,6 +1413,27 @@ components: schema: $ref: '../schemas/_common.yaml#/components/schemas/Duration' style: form + cluster.stats::path.index_metric: + in: path + name: index_metric + description: Limit the information returned for indexes metric to the specific index metrics. It can be used only if indexes (or all) metric is specified. + required: true + schema: + type: array + items: + $ref: '../schemas/cluster.stats.yaml#/components/schemas/IndexMetric' + style: simple + cluster.stats::path.metric: + in: path + name: metric + description: Limit the information returned to the specified metrics + required: true + schema: + type: array + items: + $ref: '../schemas/cluster.stats.yaml#/components/schemas/Metric' + style: + simple cluster.stats::path.node_id: in: path name: node_id diff --git a/spec/schemas/cluster.stats.yaml b/spec/schemas/cluster.stats.yaml index 55a95cd61..3e8cb8987 100644 --- a/spec/schemas/cluster.stats.yaml +++ b/spec/schemas/cluster.stats.yaml @@ -27,8 +27,6 @@ components: required: - cluster_name - cluster_uuid - - indices - - nodes - status - timestamp ClusterIndices: @@ -60,17 +58,6 @@ components: type: array items: $ref: '#/components/schemas/IndicesVersions' - required: - - analysis - - completion - - count - - docs - - fielddata - - mappings - - query_cache - - segments - - shards - - store CharFilterTypes: type: object properties: @@ -271,18 +258,6 @@ components: type: array items: $ref: '_common.yaml#/components/schemas/VersionString' - required: - - count - - discovery_types - - fs - - ingest - - jvm - - network_types - - os - - packaging_types - - plugins - - process - - versions ClusterNodeCount: type: object properties: @@ -689,3 +664,30 @@ components: - avg - max - min + Metric: + type: string + enum: + - _all + - discovery_type + - fs + - indices + - ingest + - jvm + - network_types + - os + - packaging_types + - plugins + - process + IndexMetric: + type: string + enum: + - _all + - analysis + - completion + - docs + - fielddata + - mappings + - query_cache + - segments + - shards + - store diff --git a/tests/default/cluster/stats/index_metric.yaml b/tests/default/cluster/stats/index_metric.yaml new file mode 100644 index 000000000..6b353913e --- /dev/null +++ b/tests/default/cluster/stats/index_metric.yaml @@ -0,0 +1,18 @@ +$schema: ../../../../json_schemas/test_story.schema.yaml + +description: Test cluster manager stats. +# TODO: Re-enable in 3.0, see https://github.com/opensearch-project/opensearch-api-specification/pull/613 +version: '>= 2.18 < 3' +chapters: + - synopsis: Get mapping and analysis indices stats. + path: /_cluster/stats/{metric}/{index_metric}/nodes/{node_id} + method: GET + parameters: + node_id: _all + metric: + - indices + index_metric: + - analysis + - mappings + response: + status: 200 diff --git a/tests/default/cluster/stats/metric.yaml b/tests/default/cluster/stats/metric.yaml new file mode 100644 index 000000000..2af5022f7 --- /dev/null +++ b/tests/default/cluster/stats/metric.yaml @@ -0,0 +1,17 @@ +$schema: ../../../../json_schemas/test_story.schema.yaml + +description: Test cluster manager stats. +# TODO: Re-enable in 3.0, see https://github.com/opensearch-project/opensearch-api-specification/pull/613 +version: '>= 2.18 < 3' +chapters: + - synopsis: Get nodes fs and jvm stats. + path: /_cluster/stats/{metric}/nodes/{node_id} + method: GET + parameters: + node_id: _all + metric: + - fs + - jvm + response: + status: 200 + From 1c46b692a8bf573010d7c154659ee3e56752a9bb Mon Sep 17 00:00:00 2001 From: Ralph Ursprung <39383228+rursprung@users.noreply.github.com> Date: Thu, 14 Nov 2024 17:34:34 +0100 Subject: [PATCH 13/16] add phone number analysis plugin (#609) this is part of opensearch-project/OpenSearch#11326. the actual implementation was done opensearch-project/OpenSearch#15915. see the commit message on the PR for further details. the new test group `analysis` has been added so that it can later be extended with all other optional language analyzers (which are currently also not covered). Signed-off-by: Ralph Ursprung --- CHANGELOG.md | 1 + spec/schemas/_common.analysis.yaml | 12 ++++++ tests/plugins/analysis/Dockerfile | 1 + .../indices/analyze/analyzer/phone.yaml | 38 +++++++++++++++++++ 4 files changed, 52 insertions(+) create mode 100644 tests/plugins/analysis/indices/analyze/analyzer/phone.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b912b2fe..5edd85dcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -136,6 +136,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Added a spec style checker [#620](https://github.com/opensearch-project/opensearch-api-specification/pull/620). - Added `remote_store` to node `Stats` ([#643](https://github.com/opensearch-project/opensearch-api-specification/pull/643)) - Added `/_cluster/stats/{metric}/nodes/{node_id}` and `/_cluster/stats/{metric}/{index_metric}/nodes/{node_id}` ([#639](https://github.com/opensearch-project/opensearch-api-specification/pull/639)) +- Added `PhoneAnalyzer` from `analysis-phonenumber` plugin ([#609](https://github.com/opensearch-project/opensearch-api-specification/pull/609)) ### Changed diff --git a/spec/schemas/_common.analysis.yaml b/spec/schemas/_common.analysis.yaml index 9cae913b6..07be175e7 100644 --- a/spec/schemas/_common.analysis.yaml +++ b/spec/schemas/_common.analysis.yaml @@ -27,6 +27,7 @@ components: - $ref: '#/components/schemas/DutchAnalyzer' - $ref: '#/components/schemas/SmartcnAnalyzer' - $ref: '#/components/schemas/CjkAnalyzer' + - $ref: '#/components/schemas/PhoneAnalyzer' CustomAnalyzer: type: object properties: @@ -367,6 +368,17 @@ components: $ref: '#/components/schemas/StopWords' stopwords_path: type: string + PhoneAnalyzer: + type: object + properties: + type: + type: string + enum: + - phone + - phone-search + phone-region: + type: string + description: Optional ISO 3166 country code, defaults to "ZZ" (unknown region). CharFilter: oneOf: - title: name diff --git a/tests/plugins/analysis/Dockerfile b/tests/plugins/analysis/Dockerfile index aa43b705b..b45c0aef9 100644 --- a/tests/plugins/analysis/Dockerfile +++ b/tests/plugins/analysis/Dockerfile @@ -4,3 +4,4 @@ ARG OPENSEARCH_DOCKER_REF FROM ${OPENSEARCH_DOCKER_HUB_PROJECT}/opensearch:${OPENSEARCH_VERSION}${OPENSEARCH_DOCKER_REF} RUN ./bin/opensearch-plugin install -b analysis-icu +RUN ./bin/opensearch-plugin install -b analysis-phonenumber diff --git a/tests/plugins/analysis/indices/analyze/analyzer/phone.yaml b/tests/plugins/analysis/indices/analyze/analyzer/phone.yaml new file mode 100644 index 000000000..528fb6ea9 --- /dev/null +++ b/tests/plugins/analysis/indices/analyze/analyzer/phone.yaml @@ -0,0 +1,38 @@ +$schema: ../../../../../../json_schemas/test_story.schema.yaml + +description: Test /{index}/_analyze for the phone and phone-search analyzers. +prologues: + - path: /example-phone + method: PUT + request: + payload: + settings: + index: + analysis: + analyzer: + phone-ch: + type: phone + phone-region: CH + phone-search-ch: + type: phone-search + phone-region: CH +epilogues: + - path: /example-phone + method: DELETE + status: [200, 404] +chapters: + - synopsis: Analyze phone number. + path: /{index}/_analyze + method: POST + parameters: + index: example-phone + request: + payload: + analyzer: phone-ch + text: '+41 60 555 12 34' + response: + status: 200 + payload: + tokens: + - token: '+41 60 555 12 34' + - token: '6055512' From 0f40a0ee1b3c3ba6273fd5d2c20f2e6652f9dc09 Mon Sep 17 00:00:00 2001 From: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> Date: Thu, 14 Nov 2024 14:11:42 -0600 Subject: [PATCH 14/16] Update Query Group API descriptions (#674) * Update Query Group API descriptions Will have @natebower review before merging. Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> * Add parameter descriptions Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> * Apply suggestions from code review Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Nathan Bower Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> --------- Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> Co-authored-by: Nathan Bower --- spec/namespaces/wlm.yaml | 18 +++++++++--------- spec/schemas/wlm._common.yaml | 5 +++++ 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/spec/namespaces/wlm.yaml b/spec/namespaces/wlm.yaml index 083f8ed9e..d9179f33e 100644 --- a/spec/namespaces/wlm.yaml +++ b/spec/namespaces/wlm.yaml @@ -1,7 +1,7 @@ openapi: 3.1.0 info: - title: OpenSearch Workload Management Query Group API - description: Query group lifecycle APIs for the workload management plugin. + title: Workload Management Query Group API + description: The Query Group Lifecycle APIs create, update, and delete workload management query groups. version: 1.0.0 paths: /_wlm/query_group: @@ -9,7 +9,7 @@ paths: operationId: wlm.get_query_group.0 x-operation-group: wlm.get_query_group x-version-added: '2.17' - description: Gets the specified QueryGroup or get all if no name is provided. + description: Retrieves the specified query group. If no query group is specified, all query groups in the cluster are retrieved. responses: '200': $ref: '#/components/responses/wlm.get_query_group@200' @@ -17,7 +17,7 @@ paths: operationId: wlm.create_query_group.0 x-operation-group: wlm.create_query_group x-version-added: '2.17' - description: Creates the specified query group. + description: Creates a new query group and sets the resource limits for the new query group. requestBody: $ref: '#/components/requestBodies/wlm.create_query_group' responses: @@ -28,7 +28,7 @@ paths: operationId: wlm.get_query_group.1 x-operation-group: wlm.get_query_group x-version-added: '2.17' - description: Gets the specified QueryGroup or get all if no name is provided. + description: Retrieves the specified query group. If no query group is specified, all query groups in the cluster are retrieved. parameters: - $ref: '#/components/parameters/wlm.get_query_group::path.name' responses: @@ -50,7 +50,7 @@ paths: operationId: wlm.delete_query_group.0 x-operation-group: wlm.delete_query_group x-version-added: '2.17' - description: Deletes the specified QueryGroup. + description: Deletes the specified query group. parameters: - $ref: '#/components/parameters/wlm.delete_query_group::path.name' responses: @@ -107,21 +107,21 @@ components: wlm.update_query_group::path.name: name: name in: path - description: QueryGroup name. + description: The name of the query group. schema: type: string required: true wlm.delete_query_group::path.name: name: name in: path - description: QueryGroup name. + description: The name of the query group. schema: type: string required: true wlm.get_query_group::path.name: name: name in: path - description: QueryGroup name. + description: The name of the query group. schema: type: string required: true diff --git a/spec/schemas/wlm._common.yaml b/spec/schemas/wlm._common.yaml index ca2c1ae7a..ab6f8816a 100644 --- a/spec/schemas/wlm._common.yaml +++ b/spec/schemas/wlm._common.yaml @@ -10,16 +10,21 @@ components: type: object properties: _id: + description: The ID of the query group, which can be used to associate query requests with the group and enforce the group's resource limits. type: string name: + description: The name of the query group. type: string resiliency_mode: + description: The resiliency mode of the query group. type: string enum: [enforced, monitor,soft] updated_at: + description: The time at which the query group was last updated. type: integer format: int64 resource_limits: + description: The resource limits for query requests in the query group. anyOf: - type: object properties: From 398481e5bd1cc590d947c35379c47096f2114f00 Mon Sep 17 00:00:00 2001 From: "Daniel (dB.) Doubrovkine" Date: Thu, 14 Nov 2024 15:57:58 -0500 Subject: [PATCH 15/16] Replaced all indices with indexes. (#671) * Replaced all indices with indexes. Signed-off-by: dblock * Fixed CHANGELOG entries under the 0.1.0 release. Signed-off-by: dblock --------- Signed-off-by: dblock --- CHANGELOG.md | 6 +- TESTING_GUIDE.md | 2 +- spec/namespaces/_core.yaml | 112 ++++---- spec/namespaces/cat.yaml | 50 ++-- spec/namespaces/cluster.yaml | 20 +- spec/namespaces/dangling_indices.yaml | 2 +- spec/namespaces/indices.yaml | 256 +++++++++--------- spec/namespaces/ism.yaml | 20 +- spec/namespaces/knn.yaml | 18 +- spec/namespaces/nodes.yaml | 2 +- spec/namespaces/security.yaml | 2 +- spec/namespaces/snapshot.yaml | 10 +- spec/schemas/_common.query_dsl.yaml | 2 +- spec/schemas/_common.yaml | 6 +- spec/schemas/asynchronous_search._common.yaml | 6 +- spec/schemas/cat.snapshots.yaml | 2 +- spec/schemas/cluster.stats.yaml | 6 +- spec/schemas/indices._common.yaml | 10 +- spec/schemas/indices.data_streams_stats.yaml | 2 +- spec/schemas/insights._common.yaml | 8 +- tests/default/_core/refresh.yaml | 2 +- tests/default/cat/segments.yaml | 2 +- tests/default/indices/mapping.yaml | 2 +- tests/default/ism/explain.yaml | 4 +- .../security/api/internalusers/authtoken.yaml | 2 +- .../security/api/securityconfig/config.yaml | 2 +- .../default/security/api/user/authtoken.yaml | 2 +- tests/default/security/authinfo.yaml | 2 +- tests/default/security/dashboardsinfo.yaml | 2 +- tests/default/security/health.yaml | 2 +- tests/default/security/tenantinfo.yaml | 2 +- tests/default/security/whoami.yaml | 2 +- .../extractor/opensearch/expected_1.3.yaml | 4 +- .../extractor/opensearch/expected_2.0.yaml | 2 +- .../specs/opensearch/namespaces/index.yaml | 8 +- .../specs/complete/namespaces/index.yaml | 8 +- .../tests/tester/fixtures/specs/excerpt.yaml | 10 +- 37 files changed, 300 insertions(+), 300 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5edd85dcf..2f24a2b46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,9 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Added `_common.mapping:FlatObjectProperty` ([#661](https://github.com/opensearch-project/opensearch-api-specification/pull/661)) - Added `HEAD /{index}/_doc/{id}` returning `404` ([#670](https://github.com/opensearch-project/opensearch-api-specification/pull/670)) - Added `_common.mapping:IcuCollationKeywordProperty` ([#666](https://github.com/opensearch-project/opensearch-api-specification/pull/666)) +- Added `/_cluster/stats/{metric}/nodes/{node_id}` and `/_cluster/stats/{metric}/{index_metric}/nodes/{node_id}` ([#639](https://github.com/opensearch-project/opensearch-api-specification/pull/639)) +- Added `PhoneAnalyzer` from `analysis-phonenumber` plugin ([#609](https://github.com/opensearch-project/opensearch-api-specification/pull/609)) +- Added `/_list/indices` & `/_list/shards` api specs ([#613](https://github.com/opensearch-project/opensearch-api-specification/pull/613)) ### 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)) @@ -135,8 +138,6 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Added API spec for `adjust_pure_negative` for bool queries ([#641](https://github.com/opensearch-project/opensearch-api-specification/pull/641)) - Added a spec style checker [#620](https://github.com/opensearch-project/opensearch-api-specification/pull/620). - Added `remote_store` to node `Stats` ([#643](https://github.com/opensearch-project/opensearch-api-specification/pull/643)) -- Added `/_cluster/stats/{metric}/nodes/{node_id}` and `/_cluster/stats/{metric}/{index_metric}/nodes/{node_id}` ([#639](https://github.com/opensearch-project/opensearch-api-specification/pull/639)) -- Added `PhoneAnalyzer` from `analysis-phonenumber` plugin ([#609](https://github.com/opensearch-project/opensearch-api-specification/pull/609)) ### Changed @@ -161,7 +162,6 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Changed `cluster.reroute`'s `metric` path param to use an enum of metrics ([#586](https://github.com/opensearch-project/opensearch-api-specification/pull/586)) - Changed `indices.stats`'s `metric` path param to use an enum of metrics ([#586](https://github.com/opensearch-project/opensearch-api-specification/pull/586)) - Changed `CleanupRepositoryResults`' properties to be `int64`s ([#587](https://github.com/opensearch-project/opensearch-api-specification/pull/587)) -- Added `/_list/indices` & `/_list/shards` api specs ([#613](https://github.com/opensearch-project/opensearch-api-specification/pull/613)) ### Deprecated diff --git a/TESTING_GUIDE.md b/TESTING_GUIDE.md index ea3867c1a..9e59bd2f6 100644 --- a/TESTING_GUIDE.md +++ b/TESTING_GUIDE.md @@ -97,7 +97,7 @@ Remember to set the `OPENSEARCH_PASSWORD` or `AWS_ACCESS_KEY_ID` and `AWS_SECRET #### FORBIDDEN/10/cluster create-index blocked (api) -The cluster is most likely hitting a disk watermark threshold. This example sets the disk watermark thresholds to 1500MB low, 100MB high, and 500MB flood stage, allowing the cluster to create indices even if the disk is almost full. +The cluster is most likely hitting a disk watermark threshold. This example sets the disk watermark thresholds to 1500MB low, 100MB high, and 500MB flood stage, allowing the cluster to create indexes even if the disk is almost full. ```bash curl -k -X PUT --user "admin:${OPENSEARCH_PASSWORD}" https://localhost:9200/_cluster/settings -H 'Content-Type: application/json' -d' diff --git a/spec/namespaces/_core.yaml b/spec/namespaces/_core.yaml index 542d55bf2..0b9a6f138 100644 --- a/spec/namespaces/_core.yaml +++ b/spec/namespaces/_core.yaml @@ -201,7 +201,7 @@ paths: operationId: field_caps.0 x-operation-group: field_caps x-version-added: '1.0' - description: Returns the information about the capabilities of fields among multiple indices. + description: Returns the information about the capabilities of fields among multiple indexes. externalDocs: url: https://opensearch.org/docs/latest/field-types/supported-field-types/alias/#using-aliases-in-field-capabilities-api-operations parameters: @@ -219,7 +219,7 @@ paths: operationId: field_caps.1 x-operation-group: field_caps x-version-added: '1.0' - description: Returns the information about the capabilities of fields among multiple indices. + description: Returns the information about the capabilities of fields among multiple indexes. externalDocs: url: https://opensearch.org/docs/latest/field-types/supported-field-types/alias/#using-aliases-in-field-capabilities-api-operations parameters: @@ -1014,7 +1014,7 @@ paths: operationId: search_shards.0 x-operation-group: search_shards x-version-added: '1.0' - description: Returns information about the indices and shards that a search request would be executed against. + description: Returns information about the indexes and shards that a search request would be executed against. externalDocs: url: https://opensearch.org/docs/latest parameters: @@ -1031,7 +1031,7 @@ paths: operationId: search_shards.1 x-operation-group: search_shards x-version-added: '1.0' - description: Returns information about the indices and shards that a search request would be executed against. + description: Returns information about the indexes and shards that a search request would be executed against. externalDocs: url: https://opensearch.org/docs/latest parameters: @@ -1534,7 +1534,7 @@ paths: operationId: field_caps.2 x-operation-group: field_caps x-version-added: '1.0' - description: Returns the information about the capabilities of fields among multiple indices. + description: Returns the information about the capabilities of fields among multiple indexes. externalDocs: url: https://opensearch.org/docs/latest/field-types/supported-field-types/alias/#using-aliases-in-field-capabilities-api-operations parameters: @@ -1553,7 +1553,7 @@ paths: operationId: field_caps.3 x-operation-group: field_caps x-version-added: '1.0' - description: Returns the information about the capabilities of fields among multiple indices. + description: Returns the information about the capabilities of fields among multiple indexes. externalDocs: url: https://opensearch.org/docs/latest/field-types/supported-field-types/alias/#using-aliases-in-field-capabilities-api-operations parameters: @@ -1992,7 +1992,7 @@ paths: operationId: search_shards.2 x-operation-group: search_shards x-version-added: '1.0' - description: Returns information about the indices and shards that a search request would be executed against. + description: Returns information about the indexes and shards that a search request would be executed against. externalDocs: url: https://opensearch.org/docs/latest parameters: @@ -2010,7 +2010,7 @@ paths: operationId: search_shards.3 x-operation-group: search_shards x-version-added: '1.0' - description: Returns information about the indices and shards that a search request would be executed against. + description: Returns information about the indexes and shards that a search request would be executed against. externalDocs: url: https://opensearch.org/docs/latest parameters: @@ -2286,7 +2286,7 @@ components: properties: scroll_id: $ref: '../schemas/_common.yaml#/components/schemas/ScrollIds' - description: Comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter + description: Comma-separated list of scroll IDs to clear if none was specified using the `scroll_id` parameter count: content: application/json: @@ -2549,7 +2549,7 @@ components: track_total_hits: $ref: '../schemas/_core.search.yaml#/components/schemas/TrackHits' indices_boost: - description: Boosts the _score of documents from specified indices. + description: Boosts the `_score` of documents from specified indexes. type: array items: type: object @@ -2624,7 +2624,7 @@ components: Use with caution. OpenSearch applies this parameter to each shard handling the request. When possible, let OpenSearch perform early termination automatically. - Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers. + Avoid specifying this parameter for requests that target data streams with backing indexes across multiple data tiers. If set to `0` (default), the query does not terminate early. type: integer format: int32 @@ -2651,7 +2651,7 @@ components: description: |- Stats groups to associate with the search. Each group maintains a statistics aggregation for its associated searches. - You can retrieve these stats using the indices stats API. + You can retrieve these stats using the indexes stats API. type: array items: type: string @@ -3515,9 +3515,9 @@ components: in: path name: index description: |- - Comma-separated list of data streams, indices, and aliases to search. + Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). - To search all data streams and indices, omit this parameter or use `*` or `_all`. + To search all data streams and indexes, omit this parameter or use `*` or `_all`. required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -3526,8 +3526,8 @@ components: in: query name: allow_no_indices description: |- - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. - This behavior applies even if the request targets other open indices. + If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. + This behavior applies even if the request targets other open indexes. schema: type: boolean style: form @@ -3581,7 +3581,7 @@ components: count::query.ignore_throttled: in: query name: ignore_throttled - description: If `true`, concrete, expanded or aliased indices are ignored when frozen. + description: If `true`, concrete, expanded or aliased indexes are ignored when frozen. schema: type: boolean style: form @@ -3723,10 +3723,10 @@ components: create_pit::path.index: name: index in: path - description: Comma-separated list of indices; use `_all` or empty string to perform the operation on all indices. + description: Comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes. schema: type: array - description: Comma-separated list of indices; use `_all` or empty string to perform the operation on all indices. + description: Comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes. items: type: string required: true @@ -3740,7 +3740,7 @@ components: create_pit::query.expand_wildcards: name: expand_wildcards in: query - description: Whether to expand wildcard expression to concrete indices that are open, closed or both. + description: Whether to expand wildcard expression to concrete indexes that are open, closed or both. schema: $ref: '../schemas/_common.yaml#/components/schemas/ExpandWildcards' create_pit::query.keep_alive: @@ -3849,9 +3849,9 @@ components: in: path name: index description: |- - Comma-separated list of data streams, indices, and aliases to search. + Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). - To search all data streams or indices, omit this parameter or use `*` or `_all`. + To search all data streams or indexes, omit this parameter or use `*` or `_all`. required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -3893,8 +3893,8 @@ components: in: query name: allow_no_indices description: |- - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. - This behavior applies even if the request targets other open indices. + If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. + This behavior applies even if the request targets other open indexes. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. schema: type: boolean @@ -4105,7 +4105,7 @@ components: Use with caution. OpenSearch applies this parameter to each shard handling the request. When possible, let OpenSearch perform early termination automatically. - Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers. + Avoid specifying this parameter for requests that target data streams with backing indexes across multiple data tiers. schema: type: integer format: int32 @@ -4207,7 +4207,7 @@ components: in: path name: index description: |- - Comma-separated list of data streams, indices, and aliases. + Comma-separated list of data streams, indexes, and aliases. Supports wildcards (`*`). required: true schema: @@ -4303,7 +4303,7 @@ components: in: path name: index description: |- - Comma-separated list of data streams, indices, and aliases. + Comma-separated list of data streams, indexes, and aliases. Supports wildcards (`*`). required: true schema: @@ -4489,7 +4489,7 @@ components: field_caps::path.index: in: path name: index - description: Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (*). To target all data streams and indices, omit this parameter or use * or _all. + description: Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (*). To target all data streams and indexes, omit this parameter or use * or _all. required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -4499,7 +4499,7 @@ components: name: allow_no_indices description: |- If false, the request returns an error if any wildcard expression, index alias, - or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request + or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. For example, a request targeting `foo*,bar*` returns an error if an index starts with foo but no index starts with bar. schema: type: boolean @@ -4521,7 +4521,7 @@ components: field_caps::query.ignore_unavailable: in: query name: ignore_unavailable - description: If `true`, missing or closed indices are not included in the response. + description: If `true`, missing or closed indexes are not included in the response. schema: type: boolean style: form @@ -4912,7 +4912,7 @@ components: msearch::path.index: in: path name: index - description: Comma-separated list of data streams, indices, and index aliases to search. + description: Comma-separated list of data streams, indexes, and index aliases to search. required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -4976,9 +4976,9 @@ components: in: path name: index description: |- - Comma-separated list of data streams, indices, and aliases to search. + Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). - To search all data streams and indices, omit this parameter or use `*`. + To search all data streams and indexes, omit this parameter or use `*`. required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -5190,8 +5190,8 @@ components: in: path name: index description: |- - Comma-separated list of data streams, indices, and index aliases used to limit the request. Wildcard (`*`) expressions are supported. - To target all data streams and indices in a cluster, omit this parameter or use `_all` or `*`. + Comma-separated list of data streams, indexes, and index aliases used to limit the request. Wildcard (`*`) expressions are supported. + To target all data streams and indexes in a cluster, omit this parameter or use `_all` or `*`. required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -5199,21 +5199,21 @@ components: rank_eval::query.allow_no_indices: in: query name: allow_no_indices - description: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. + description: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. schema: type: boolean style: form rank_eval::query.expand_wildcards: in: query name: expand_wildcards - description: Whether to expand wildcard expression to concrete indices that are open, closed or both. + description: Whether to expand wildcard expression to concrete indexes that are open, closed or both. schema: $ref: '../schemas/_common.yaml#/components/schemas/ExpandWildcards' style: form rank_eval::query.ignore_unavailable: in: query name: ignore_unavailable - description: If `true`, missing or closed indices are not included in the response. + description: If `true`, missing or closed indexes are not included in the response. schema: type: boolean style: form @@ -5355,9 +5355,9 @@ components: in: path name: index description: |- - Comma-separated list of data streams, indices, and aliases to search. + Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). - To search all data streams and indices, omit this parameter or use `*` or `_all`. + To search all data streams and indexes, omit this parameter or use `*` or `_all`. required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -5400,8 +5400,8 @@ components: in: query name: allow_no_indices description: |- - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. - This behavior applies even if the request targets other open indices. + If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. + This behavior applies even if the request targets other open indexes. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. schema: type: boolean @@ -5510,7 +5510,7 @@ components: search::query.ignore_throttled: in: query name: ignore_throttled - description: If `true`, concrete, expanded or aliased indices will be ignored when frozen. + description: If `true`, concrete, expanded or aliased indexes will be ignored when frozen. schema: type: boolean style: form @@ -5740,7 +5740,7 @@ components: Use with caution. OpenSearch applies this parameter to each shard handling the request. When possible, let OpenSearch perform early termination automatically. - Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers. + Avoid specifying this parameter for requests that target data streams with backing indexes across multiple data tiers. If set to `0` (default), the query does not terminate early. schema: type: integer @@ -5797,7 +5797,7 @@ components: search_shards::path.index: in: path name: index - description: Returns the indices and shards that a search request would be executed against. + description: Returns the indexes and shards that a search request would be executed against. required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -5806,8 +5806,8 @@ components: in: query name: allow_no_indices description: |- - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. - This behavior applies even if the request targets other open indices. + If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. + This behavior applies even if the request targets other open indexes. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. schema: type: boolean @@ -5859,7 +5859,7 @@ components: in: path name: index description: |- - Comma-separated list of data streams, indices, + Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (*). required: true schema: @@ -5869,8 +5869,8 @@ components: in: query name: allow_no_indices description: |- - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. - This behavior applies even if the request targets other open indices. + If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. + This behavior applies even if the request targets other open indexes. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. schema: type: boolean @@ -5904,7 +5904,7 @@ components: search_template::query.ignore_throttled: in: query name: ignore_throttled - description: If `true`, specified concrete, expanded, or aliased indices are not included in the response when throttled. + description: If `true`, specified concrete, expanded, or aliased indexes are not included in the response when throttled. schema: type: boolean style: form @@ -6195,9 +6195,9 @@ components: in: path name: index description: |- - Comma-separated list of data streams, indices, and aliases to search. + Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). - To search all data streams or indices, omit this parameter or use `*` or `_all`. + To search all data streams or indexes, omit this parameter or use `*` or `_all`. required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -6239,8 +6239,8 @@ components: in: query name: allow_no_indices description: |- - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. - This behavior applies even if the request targets other open indices. + If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. + This behavior applies even if the request targets other open indexes. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. schema: type: boolean @@ -6456,7 +6456,7 @@ components: Use with caution. OpenSearch applies this parameter to each shard handling the request. When possible, let OpenSearch perform early termination automatically. - Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers. + Avoid specifying this parameter for requests that target data streams with backing indexes across multiple data tiers. schema: type: integer format: int32 diff --git a/spec/namespaces/cat.yaml b/spec/namespaces/cat.yaml index c89368e5b..7e05cdea5 100644 --- a/spec/namespaces/cat.yaml +++ b/spec/namespaces/cat.yaml @@ -20,7 +20,7 @@ paths: operationId: cat.aliases.0 x-operation-group: cat.aliases x-version-added: '1.0' - description: Shows information about currently configured aliases to indices including filter and routing infos. + description: Shows information about currently configured aliases to indexes including filter and routing info. externalDocs: url: https://opensearch.org/docs/latest/api-reference/cat/cat-aliases/ parameters: @@ -39,7 +39,7 @@ paths: operationId: cat.aliases.1 x-operation-group: cat.aliases x-version-added: '1.0' - description: Shows information about currently configured aliases to indices including filter and routing infos. + description: Shows information about currently configured aliases to indexes including filter and routing info. externalDocs: url: https://opensearch.org/docs/latest/api-reference/cat/cat-aliases/ parameters: @@ -122,7 +122,7 @@ paths: operationId: cat.count.0 x-operation-group: cat.count x-version-added: '1.0' - description: Provides quick access to the document count of the entire cluster, or individual indices. + description: Provides quick access to the document count of the entire cluster, or individual indexes. externalDocs: url: https://opensearch.org/docs/latest/api-reference/cat/cat-count/ parameters: @@ -139,7 +139,7 @@ paths: operationId: cat.count.1 x-operation-group: cat.count x-version-added: '1.0' - description: Provides quick access to the document count of the entire cluster, or individual indices. + description: Provides quick access to the document count of the entire cluster, or individual indexes. externalDocs: url: https://opensearch.org/docs/latest/api-reference/cat/cat-count/ parameters: @@ -215,7 +215,7 @@ paths: operationId: cat.indices.0 x-operation-group: cat.indices x-version-added: '1.0' - description: 'Returns information about indices: number of primaries and replicas, document counts, disk size, ...' + description: 'Returns information about indexes: number of primaries and replicas, document counts, disk size, ...' externalDocs: url: https://opensearch.org/docs/latest/api-reference/cat/cat-indices/ parameters: @@ -241,7 +241,7 @@ paths: operationId: cat.indices.1 x-operation-group: cat.indices x-version-added: '1.0' - description: 'Returns information about indices: number of primaries and replicas, document counts, disk size, ...' + description: 'Returns information about indexes: number of primaries and replicas, document counts, disk size, ...' externalDocs: url: https://opensearch.org/docs/latest/api-reference/cat/cat-indices/ parameters: @@ -1066,7 +1066,7 @@ components: cat.aliases::query.expand_wildcards: in: query name: expand_wildcards - description: Whether to expand wildcard expression to concrete indices that are open, closed or both. + description: Whether to expand wildcard expression to concrete indexes that are open, closed or both. schema: $ref: '../schemas/_common.yaml#/components/schemas/ExpandWildcards' style: form @@ -1331,8 +1331,8 @@ components: in: path name: index description: |- - Comma-separated list of data streams, indices, and aliases used to limit the request. - Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. + Comma-separated list of data streams, indexes, and aliases used to limit the request. + Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -1515,8 +1515,8 @@ components: in: path name: index description: |- - Comma-separated list of data streams, indices, and aliases used to limit the request. - Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. + Comma-separated list of data streams, indexes, and aliases used to limit the request. + Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -1563,7 +1563,7 @@ components: cat.indices::query.health: in: query name: health - description: The health status used to limit returned indices. By default, the response includes indices of any health status. + description: The health status used to limit returned indexes. By default, the response includes indexes of any health status. schema: $ref: '../schemas/_common.yaml#/components/schemas/HealthStatus' style: form @@ -2066,8 +2066,8 @@ components: in: path name: index description: |- - A comma-separated list of data streams, indices, and aliases used to limit the request. - Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. + A comma-separated list of data streams, indexes, and aliases used to limit the request. + Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -2247,10 +2247,10 @@ components: cat.segment_replication::query.allow_no_indices: name: allow_no_indices in: query - description: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified). + description: Whether to ignore if a wildcard indexes expression resolves into no concrete indexes. (This includes `_all` string or when no indexes have been specified). schema: type: boolean - description: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified). + description: Whether to ignore if a wildcard indexes expression resolves into no concrete indexes. (This includes `_all` string or when no indexes have been specified). cat.segment_replication::query.bytes: name: bytes in: query @@ -2276,7 +2276,7 @@ components: cat.segment_replication::query.expand_wildcards: name: expand_wildcards in: query - description: Whether to expand wildcard expression to concrete indices that are open, closed or both. + description: Whether to expand wildcard expression to concrete indexes that are open, closed or both. schema: $ref: '../schemas/_common.yaml#/components/schemas/ExpandWildcards' cat.segment_replication::query.format: @@ -2308,17 +2308,17 @@ components: cat.segment_replication::query.ignore_throttled: name: ignore_throttled in: query - description: Whether specified concrete, expanded or aliased indices should be ignored when throttled. + description: Whether specified concrete, expanded or aliased indexes should be ignored when throttled. schema: type: boolean - description: Whether specified concrete, expanded or aliased indices should be ignored when throttled. + description: Whether specified concrete, expanded or aliased indexes should be ignored when throttled. cat.segment_replication::query.ignore_unavailable: name: ignore_unavailable in: query - description: Whether specified concrete indices should be ignored when unavailable (missing or closed). + description: Whether specified concrete indexes should be ignored when unavailable (missing or closed). schema: type: boolean - description: Whether specified concrete indices should be ignored when unavailable (missing or closed). + description: Whether specified concrete indexes should be ignored when unavailable (missing or closed). cat.segment_replication::query.index: name: index in: query @@ -2376,9 +2376,9 @@ components: in: path name: index description: |- - A comma-separated list of data streams, indices, and aliases used to limit the request. + A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). - To target all data streams and indices, omit this parameter or use `*` or `_all`. + To target all data streams and indexes, omit this parameter or use `*` or `_all`. required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -2455,9 +2455,9 @@ components: in: path name: index description: |- - A comma-separated list of data streams, indices, and aliases used to limit the request. + A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). - To target all data streams and indices, omit this parameter or use `*` or `_all`. + To target all data streams and indexes, omit this parameter or use `*` or `_all`. required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' diff --git a/spec/namespaces/cluster.yaml b/spec/namespaces/cluster.yaml index d8bc97d90..30ac38284 100644 --- a/spec/namespaces/cluster.yaml +++ b/spec/namespaces/cluster.yaml @@ -539,8 +539,8 @@ components: allow_auto_create: description: |- This setting overrides the value of the `action.auto_create_index` cluster setting. - If set to `true` in a template, then indices can be automatically created using that - template even if auto-creation of indices is disabled via `actions.auto_create_index`. + If set to `true` in a template, then indexes can be automatically created using that + template even if auto-creation of indexes is disabled using `actions.auto_create_index`. If set to `false` then data streams matching the template must always be explicitly created. type: boolean template: @@ -1009,7 +1009,7 @@ components: cluster.health::path.index: in: path name: index - description: Comma-separated list of data streams, indices, and index aliases used to limit the request. Wildcard expressions (*) are supported. To target all data streams and indices in a cluster, omit this parameter or use `_all` or `*`. + description: Comma-separated list of data streams, indexes, and index aliases used to limit the request. Wildcard expressions (*) are supported. To target all data streams and indexes in a cluster, omit this parameter or use `_all` or `*`. required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -1031,14 +1031,14 @@ components: cluster.health::query.expand_wildcards: in: query name: expand_wildcards - description: Whether to expand wildcard expression to concrete indices that are open, closed or both. + description: Whether to expand wildcard expression to concrete indexes that are open, closed or both. schema: $ref: '../schemas/_common.yaml#/components/schemas/ExpandWildcards' style: form cluster.health::query.level: in: query name: level - description: Can be one of cluster, indices or shards. Controls the details level of the health information returned. + description: Can be one of cluster, indexes or shards. Controls the details level of the health information returned. schema: $ref: '../schemas/cluster.health.yaml#/components/schemas/Level' style: form @@ -1175,7 +1175,7 @@ components: description: |- Name of the component template to create. OpenSearch includes the following built-in component templates: `logs-mappings`; 'logs-settings`; `metrics-mappings`; `metrics-settings`;`synthetics-mapping`; `synthetics-settings`. - OpenSearch Agent uses these templates to configure backing indices for its data streams. + OpenSearch Agent uses these templates to configure backing indexes for its data streams. If you use OpenSearch Agent and want to overwrite one of these templates, set the `version` for your replacement template higher than the current version. If you don't use OpenSearch Agent and want to disable all built-in component and index templates, set `stack.templates.enabled` to `false` using the cluster update settings API. required: true @@ -1330,7 +1330,7 @@ components: cluster.state::path.index: in: path name: index - description: A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + description: A comma-separated list of index names; use `_all` or empty string to perform the operation on all indexes required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -1348,7 +1348,7 @@ components: cluster.state::query.allow_no_indices: in: query name: allow_no_indices - description: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + description: Whether to ignore if a wildcard indexes expression resolves into no concrete indexes. (This includes `_all` string or when no indexes have been specified) schema: type: boolean style: form @@ -1362,7 +1362,7 @@ components: cluster.state::query.expand_wildcards: in: query name: expand_wildcards - description: Whether to expand wildcard expression to concrete indices that are open, closed or both. + description: Whether to expand wildcard expression to concrete indexes that are open, closed or both. schema: $ref: '../schemas/_common.yaml#/components/schemas/ExpandWildcards' style: form @@ -1377,7 +1377,7 @@ components: cluster.state::query.ignore_unavailable: in: query name: ignore_unavailable - description: Whether specified concrete indices should be ignored when unavailable (missing or closed) + description: Whether specified concrete indexes should be ignored when unavailable (missing or closed) schema: type: boolean style: form diff --git a/spec/namespaces/dangling_indices.yaml b/spec/namespaces/dangling_indices.yaml index d4ba7438b..c81970e84 100644 --- a/spec/namespaces/dangling_indices.yaml +++ b/spec/namespaces/dangling_indices.yaml @@ -9,7 +9,7 @@ paths: operationId: dangling_indices.list_dangling_indices.0 x-operation-group: dangling_indices.list_dangling_indices x-version-added: '1.0' - description: Returns all dangling indices. + description: Returns all dangling indexes. externalDocs: url: https://opensearch.org/docs/latest/api-reference/index-apis/dangling-index/ parameters: [] diff --git a/spec/namespaces/indices.yaml b/spec/namespaces/indices.yaml index cae77c601..a820e2621 100644 --- a/spec/namespaces/indices.yaml +++ b/spec/namespaces/indices.yaml @@ -198,7 +198,7 @@ paths: x-distributions-excluded: - amazon-managed - amazon-serverless - description: Clears all or specific caches for one or more indices. + description: Clears all or specific caches for one or more indexes. externalDocs: url: https://opensearch.org/docs/latest/api-reference/index-apis/clear-index-cache/ parameters: @@ -295,7 +295,7 @@ paths: operationId: indices.flush.0 x-operation-group: indices.flush x-version-added: '1.0' - description: Performs the flush operation on one or more indices. + description: Performs the flush operation on one or more indexes. externalDocs: url: https://opensearch.org/docs/latest parameters: @@ -311,7 +311,7 @@ paths: operationId: indices.flush.1 x-operation-group: indices.flush x-version-added: '1.0' - description: Performs the flush operation on one or more indices. + description: Performs the flush operation on one or more indexes. externalDocs: url: https://opensearch.org/docs/latest parameters: @@ -331,7 +331,7 @@ paths: x-distributions-excluded: - amazon-managed - amazon-serverless - description: Performs the force merge operation on one or more indices. + description: Performs the force merge operation on one or more indexes. externalDocs: url: https://opensearch.org/docs/latest parameters: @@ -507,7 +507,7 @@ paths: operationId: indices.get_mapping.0 x-operation-group: indices.get_mapping x-version-added: '1.0' - description: Returns mappings for one or more indices. + description: Returns mappings for one or more indexes. externalDocs: url: https://opensearch.org/docs/latest/field-types/index/#get-a-mapping parameters: @@ -558,7 +558,7 @@ paths: operationId: indices.refresh.0 x-operation-group: indices.refresh x-version-added: '1.0' - description: Performs the refresh operation in one or more indices. + description: Performs the refresh operation in one or more indexes. externalDocs: url: https://opensearch.org/docs/latest/tuning-your-cluster/availability-and-recovery/remote-store/index/#refresh-level-and-request-level-durability parameters: @@ -572,7 +572,7 @@ paths: operationId: indices.refresh.1 x-operation-group: indices.refresh x-version-added: '1.0' - description: Performs the refresh operation in one or more indices. + description: Performs the refresh operation in one or more indexes. externalDocs: url: https://opensearch.org/docs/latest/tuning-your-cluster/availability-and-recovery/remote-store/index/#refresh-level-and-request-level-durability parameters: @@ -587,7 +587,7 @@ paths: operationId: indices.resolve_index.0 x-operation-group: indices.resolve_index x-version-added: '1.0' - description: Returns information about any matching indices, aliases, and data streams. + description: Returns information about any matching indexes, aliases, and data streams. externalDocs: url: https://opensearch.org/docs/latest parameters: @@ -623,7 +623,7 @@ paths: x-distributions-excluded: - amazon-managed - amazon-serverless - description: Returns settings for one or more indices. + description: Returns settings for one or more indexes. externalDocs: url: https://opensearch.org/docs/latest/api-reference/index-apis/get-settings/ parameters: @@ -664,7 +664,7 @@ paths: operationId: indices.get_settings.1 x-operation-group: indices.get_settings x-version-added: '1.0' - description: Returns settings for one or more indices. + description: Returns settings for one or more indexes. externalDocs: url: https://opensearch.org/docs/latest/api-reference/index-apis/get-settings/ parameters: @@ -685,7 +685,7 @@ paths: operationId: indices.shard_stores.0 x-operation-group: indices.shard_stores x-version-added: '1.0' - description: Provides store information for shard copies of indices. + description: Provides store information for shard copies of indexes. externalDocs: url: https://opensearch.org/docs/latest parameters: @@ -971,7 +971,7 @@ paths: operationId: indices.get.0 x-operation-group: indices.get x-version-added: '1.0' - description: Returns information about one or more indices. + description: Returns information about one or more indexes. externalDocs: url: https://opensearch.org/docs/latest/api-reference/index-apis/get-index/ parameters: @@ -1300,7 +1300,7 @@ paths: operationId: indices.clear_cache.1 x-operation-group: indices.clear_cache x-version-added: '1.0' - description: Clears all or specific caches for one or more indices. + description: Clears all or specific caches for one or more indexes. externalDocs: url: https://opensearch.org/docs/latest/api-reference/index-apis/clear-index-cache/ parameters: @@ -1385,7 +1385,7 @@ paths: operationId: indices.flush.2 x-operation-group: indices.flush x-version-added: '1.0' - description: Performs the flush operation on one or more indices. + description: Performs the flush operation on one or more indexes. externalDocs: url: https://opensearch.org/docs/latest parameters: @@ -1402,7 +1402,7 @@ paths: operationId: indices.flush.3 x-operation-group: indices.flush x-version-added: '1.0' - description: Performs the flush operation on one or more indices. + description: Performs the flush operation on one or more indexes. externalDocs: url: https://opensearch.org/docs/latest parameters: @@ -1420,7 +1420,7 @@ paths: operationId: indices.forcemerge.1 x-operation-group: indices.forcemerge x-version-added: '1.0' - description: Performs the force merge operation on one or more indices. + description: Performs the force merge operation on one or more indexes. externalDocs: url: https://opensearch.org/docs/latest parameters: @@ -1441,7 +1441,7 @@ paths: operationId: indices.get_mapping.1 x-operation-group: indices.get_mapping x-version-added: '1.0' - description: Returns mappings for one or more indices. + description: Returns mappings for one or more indexes. externalDocs: url: https://opensearch.org/docs/latest/field-types/index/#get-a-mapping parameters: @@ -1559,7 +1559,7 @@ paths: operationId: indices.refresh.2 x-operation-group: indices.refresh x-version-added: '1.0' - description: Performs the refresh operation in one or more indices. + description: Performs the refresh operation in one or more indexes. externalDocs: url: https://opensearch.org/docs/latest/tuning-your-cluster/availability-and-recovery/remote-store/index/#refresh-level-and-request-level-durability parameters: @@ -1574,7 +1574,7 @@ paths: operationId: indices.refresh.3 x-operation-group: indices.refresh x-version-added: '1.0' - description: Performs the refresh operation in one or more indices. + description: Performs the refresh operation in one or more indexes. externalDocs: url: https://opensearch.org/docs/latest/tuning-your-cluster/availability-and-recovery/remote-store/index/#refresh-level-and-request-level-durability parameters: @@ -1610,7 +1610,7 @@ paths: operationId: indices.get_settings.2 x-operation-group: indices.get_settings x-version-added: '1.0' - description: Returns settings for one or more indices. + description: Returns settings for one or more indexes. externalDocs: url: https://opensearch.org/docs/latest/api-reference/index-apis/get-settings/ parameters: @@ -1653,7 +1653,7 @@ paths: operationId: indices.get_settings.3 x-operation-group: indices.get_settings x-version-added: '1.0' - description: Returns settings for one or more indices. + description: Returns settings for one or more indexes. externalDocs: url: https://opensearch.org/docs/latest/api-reference/index-apis/get-settings/ parameters: @@ -1675,7 +1675,7 @@ paths: operationId: indices.shard_stores.1 x-operation-group: indices.shard_stores x-version-added: '1.0' - description: Provides store information for shard copies of indices. + description: Provides store information for shard copies of indexes. externalDocs: url: https://opensearch.org/docs/latest parameters: @@ -2005,7 +2005,7 @@ components: is_write_index: description: |- If `true`, sets the write index or data stream for the alias. - If an alias points to multiple indices or data streams and `is_write_index` isn't set, the alias rejects write requests. + If an alias points to multiple indexes or data streams and `is_write_index` isn't set, the alias rejects write requests. If an index alias points to one index and `is_write_index` isn't set, the index automatically acts as the write index. Data stream aliases don't automatically set a write data stream, even if the alias points to one data stream. type: boolean @@ -2125,7 +2125,7 @@ components: index_patterns: description: |- Array of wildcard expressions used to match the names - of indices during creation. + of indexes during creation. oneOf: - type: string - type: array @@ -2203,8 +2203,8 @@ components: allow_auto_create: description: |- This setting overrides the value of the `action.auto_create_index` cluster setting. - If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`. - If set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created. + If set to `true` in a template, then indexes can be automatically created using that template even if auto-creation of indexes is disabled using `actions.auto_create_index`. + If set to `false`, then indexes or data streams matching the template must always be explicitly created, and may never be automatically created. type: boolean index_patterns: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -2374,7 +2374,7 @@ components: _shards: $ref: '../schemas/_common.yaml#/components/schemas/ShardStatistics' backing_indices: - description: Total number of backing indices for the selected data streams. + description: Total number of backing indexes for the selected data streams. type: number data_stream_count: description: Total number of selected data streams. @@ -2771,7 +2771,7 @@ components: indices.add_block::path.index: in: path name: index - description: A comma separated list of indices to add a block to + description: A comma separated list of indexes to add a block to required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -2779,7 +2779,7 @@ components: indices.add_block::query.allow_no_indices: in: query name: allow_no_indices - description: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + description: Whether to ignore if a wildcard indexes expression resolves into no concrete indexes. (This includes `_all` string or when no indexes have been specified) schema: type: boolean style: form @@ -2793,14 +2793,14 @@ components: indices.add_block::query.expand_wildcards: in: query name: expand_wildcards - description: Whether to expand wildcard expression to concrete indices that are open, closed or both. + description: Whether to expand wildcard expression to concrete indexes that are open, closed or both. schema: $ref: '../schemas/_common.yaml#/components/schemas/ExpandWildcards' style: form indices.add_block::query.ignore_unavailable: in: query name: ignore_unavailable - description: Whether specified concrete indices should be ignored when unavailable (missing or closed) + description: Whether specified concrete indexes should be ignored when unavailable (missing or closed) schema: type: boolean style: form @@ -2843,9 +2843,9 @@ components: in: path name: index description: |- - Comma-separated list of data streams, indices, and aliases used to limit the request. + Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). - To target all data streams and indices, omit this parameter or use `*` or `_all`. + To target all data streams and indexes, omit this parameter or use `*` or `_all`. required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -2854,8 +2854,8 @@ components: in: query name: allow_no_indices description: |- - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. - This behavior applies even if the request targets other open indices. + If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. + This behavior applies even if the request targets other open indexes. schema: type: boolean style: form @@ -2905,13 +2905,13 @@ components: indices.clear_cache::query.index: name: index in: query - description: Comma-separated list of indices; use `_all` or empty string to perform the operation on all indices. + description: Comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes. style: form schema: type: array items: type: string - description: Comma-separated list of indices; use `_all` or empty string to perform the operation on all indices. + description: Comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes. explode: true indices.clear_cache::query.query: in: query @@ -3007,8 +3007,8 @@ components: in: query name: allow_no_indices description: |- - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. - This behavior applies even if the request targets other open indices. + If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. + This behavior applies even if the request targets other open indexes. schema: type: boolean style: form @@ -3141,7 +3141,7 @@ components: in: path name: index description: |- - Comma-separated list of indices to delete. + Comma-separated list of indexes to delete. You cannot specify index aliases. By default, this parameter does not support wildcards (`*`) or `_all`. To use wildcards or `_all`, set the `action.destructive_requires_name` cluster setting to `false`. @@ -3153,8 +3153,8 @@ components: in: query name: allow_no_indices description: |- - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. - This behavior applies even if the request targets other open indices. + If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. + This behavior applies even if the request targets other open indexes. schema: type: boolean default: false @@ -3210,7 +3210,7 @@ components: in: path name: index description: |- - Comma-separated list of data streams or indices used to limit the request. + Comma-separated list of data streams or indexes used to limit the request. Supports wildcards (`*`). required: true schema: @@ -3335,7 +3335,7 @@ components: indices.exists::path.index: in: path name: index - description: Comma-separated list of data streams, indices, and aliases. Supports wildcards (`*`). + description: Comma-separated list of data streams, indexes, and aliases. Supports wildcards (`*`). required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -3351,8 +3351,8 @@ components: in: query name: allow_no_indices description: |- - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. - This behavior applies even if the request targets other open indices. + If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. + This behavior applies even if the request targets other open indexes. schema: type: boolean default: false @@ -3404,8 +3404,8 @@ components: in: path name: index description: |- - Comma-separated list of data streams or indices used to limit the request. Supports wildcards (`*`). - To target all data streams and indices, omit this parameter or use `*` or `_all`. + Comma-separated list of data streams or indexes used to limit the request. Supports wildcards (`*`). + To target all data streams and indexes, omit this parameter or use `*` or `_all`. required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -3422,8 +3422,8 @@ components: in: query name: allow_no_indices description: |- - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. - This behavior applies even if the request targets other open indices. + If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. + This behavior applies even if the request targets other open indexes. schema: type: boolean style: form @@ -3441,7 +3441,7 @@ components: indices.exists_alias::query.ignore_unavailable: in: query name: ignore_unavailable - description: If `false`, requests that include a missing data stream or index in the target indices or data streams return an error. + description: If `false`, requests that include a missing data stream or index in the target indexes or data streams return an error. schema: type: boolean style: form @@ -3539,9 +3539,9 @@ components: in: path name: index description: |- - Comma-separated list of data streams, indices, and aliases to flush. + Comma-separated list of data streams, indexes, and aliases to flush. Supports wildcards (`*`). - To flush all data streams and indices, omit this parameter or use `*` or `_all`. + To flush all data streams and indexes, omit this parameter or use `*` or `_all`. required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -3550,8 +3550,8 @@ components: in: query name: allow_no_indices description: |- - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. - This behavior applies even if the request targets other open indices. + If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. + This behavior applies even if the request targets other open indexes. schema: type: boolean style: form @@ -3593,7 +3593,7 @@ components: indices.forcemerge::path.index: in: path name: index - description: A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + description: A comma-separated list of index names; use `_all` or empty string to perform the operation on all indexes required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -3601,14 +3601,14 @@ components: indices.forcemerge::query.allow_no_indices: in: query name: allow_no_indices - description: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + description: Whether to ignore if a wildcard indexes expression resolves into no concrete indexes. (This includes `_all` string or when no indexes have been specified) schema: type: boolean style: form indices.forcemerge::query.expand_wildcards: in: query name: expand_wildcards - description: Whether to expand wildcard expression to concrete indices that are open, closed or both. + description: Whether to expand wildcard expression to concrete indexes that are open, closed or both. schema: $ref: '../schemas/_common.yaml#/components/schemas/ExpandWildcards' style: form @@ -3623,7 +3623,7 @@ components: indices.forcemerge::query.ignore_unavailable: in: query name: ignore_unavailable - description: Whether specified concrete indices should be ignored when unavailable (missing or closed) + description: Whether specified concrete indexes should be ignored when unavailable (missing or closed) schema: type: boolean style: form @@ -3666,7 +3666,7 @@ components: in: path name: index description: |- - Comma-separated list of data streams, indices, and index aliases used to limit the request. + Comma-separated list of data streams, indexes, and index aliases used to limit the request. Wildcard expressions (*) are supported. required: true schema: @@ -3677,7 +3677,7 @@ components: name: allow_no_indices description: |- If false, the request returns an error if any wildcard expression, index alias, or _all value targets only - missing or closed indices. This behavior applies even if the request targets other open indices. For example, + missing or closed indexes. This behavior applies even if the request targets other open indexes. For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. schema: type: boolean @@ -3746,9 +3746,9 @@ components: in: path name: index description: |- - Comma-separated list of data streams or indices used to limit the request. + Comma-separated list of data streams or indexes used to limit the request. Supports wildcards (`*`). - To target all data streams and indices, omit this parameter or use `*` or `_all`. + To target all data streams and indexes, omit this parameter or use `*` or `_all`. required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -3768,8 +3768,8 @@ components: in: query name: allow_no_indices description: |- - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. - This behavior applies even if the request targets other open indices. + If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. + This behavior applies even if the request targets other open indexes. schema: type: boolean style: form @@ -3821,9 +3821,9 @@ components: in: path name: index description: |- - Comma-separated list of data streams, indices, and aliases used to limit the request. + Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). - To target all data streams and indices, omit this parameter or use `*` or `_all`. + To target all data streams and indexes, omit this parameter or use `*` or `_all`. required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -3832,8 +3832,8 @@ components: in: query name: allow_no_indices description: |- - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. - This behavior applies even if the request targets other open indices. + If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. + This behavior applies even if the request targets other open indexes. schema: type: boolean style: form @@ -3915,9 +3915,9 @@ components: in: path name: index description: |- - Comma-separated list of data streams, indices, and aliases used to limit the request. + Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). - To target all data streams and indices, omit this parameter or use `*` or `_all`. + To target all data streams and indexes, omit this parameter or use `*` or `_all`. required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -3926,8 +3926,8 @@ components: in: query name: allow_no_indices description: |- - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. - This behavior applies even if the request targets other open indices. + If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. + This behavior applies even if the request targets other open indexes. schema: type: boolean style: form @@ -3960,9 +3960,9 @@ components: in: query name: index description: |- - Comma-separated list of data streams, indices, and aliases used to limit the request. + Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). - To target all data streams and indices, omit this parameter or use `*` or `_all`. + To target all data streams and indexes, omit this parameter or use `*` or `_all`. schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' style: form @@ -3990,9 +3990,9 @@ components: in: path name: index description: |- - Comma-separated list of data streams, indices, and aliases used to limit + Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and - indices, omit this parameter or use `*` or `_all`. + indexes, omit this parameter or use `*` or `_all`. required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -4010,8 +4010,8 @@ components: name: allow_no_indices description: |- If `false`, the request returns an error if any wildcard expression, index - alias, or `_all` value targets only missing or closed indices. This - behavior applies even if the request targets other open indices. For + alias, or `_all` value targets only missing or closed indexes. This + behavior applies even if the request targets other open indexes. For example, a request targeting `foo*,bar*` returns an error if an index starts with foo but no index starts with `bar`. schema: @@ -4129,40 +4129,40 @@ components: indices.get_upgrade::path.index: name: index in: path - description: Comma-separated list of indices; use `_all` or empty string to perform the operation on all indices. + description: Comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes. schema: type: array - description: Comma-separated list of indices; use `_all` or empty string to perform the operation on all indices. + description: Comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes. items: type: string required: true indices.get_upgrade::query.allow_no_indices: name: allow_no_indices in: query - description: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified). + description: Whether to ignore if a wildcard indexes expression resolves into no concrete indexes. (This includes `_all` string or when no indexes have been specified). schema: type: boolean - description: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified). + description: Whether to ignore if a wildcard indexes expression resolves into no concrete indexes. (This includes `_all` string or when no indexes have been specified). indices.get_upgrade::query.expand_wildcards: name: expand_wildcards in: query - description: Whether to expand wildcard expression to concrete indices that are open, closed or both. + description: Whether to expand wildcard expression to concrete indexes that are open, closed or both. schema: $ref: '../schemas/_common.yaml#/components/schemas/ExpandWildcards' indices.get_upgrade::query.ignore_unavailable: name: ignore_unavailable in: query - description: Whether specified concrete indices should be ignored when unavailable (missing or closed). + description: Whether specified concrete indexes should be ignored when unavailable (missing or closed). schema: type: boolean - description: Whether specified concrete indices should be ignored when unavailable (missing or closed). + description: Whether specified concrete indexes should be ignored when unavailable (missing or closed). indices.open::path.index: in: path name: index description: |- - Comma-separated list of data streams, indices, and aliases used to limit the request. + Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). - By default, you must explicitly name the indices you using to limit the request. + By default, you must explicitly name the indexes you using to limit the request. To limit a request using `_all`, `*`, or other wildcard expressions, change the `action.destructive_requires_name` setting to false. You can update this setting in the `opensearch.yml` file or using the cluster update settings API. required: true @@ -4173,8 +4173,8 @@ components: in: query name: allow_no_indices description: |- - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. - This behavior applies even if the request targets other open indices. + If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. + This behavior applies even if the request targets other open indexes. schema: type: boolean style: form @@ -4252,9 +4252,9 @@ components: in: path name: index description: |- - Comma-separated list of data streams or indices to add. + Comma-separated list of data streams or indexes to add. Supports wildcards (`*`). - Wildcard patterns that match both data streams and indices return an error. + Wildcard patterns that match both data streams and indexes return an error. required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -4341,7 +4341,7 @@ components: indices.put_mapping::path.index: in: path name: index - description: A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices. + description: A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indexes. required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -4350,8 +4350,8 @@ components: in: query name: allow_no_indices description: |- - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. - This behavior applies even if the request targets other open indices. + If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. + This behavior applies even if the request targets other open indexes. schema: type: boolean style: form @@ -4413,9 +4413,9 @@ components: in: path name: index description: |- - Comma-separated list of data streams, indices, and aliases used to limit + Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and - indices, omit this parameter or use `*` or `_all`. + indexes, omit this parameter or use `*` or `_all`. required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -4425,8 +4425,8 @@ components: name: allow_no_indices description: |- If `false`, the request returns an error if any wildcard expression, index - alias, or `_all` value targets only missing or closed indices. This - behavior applies even if the request targets other open indices. For + alias, or `_all` value targets only missing or closed indexes. This + behavior applies even if the request targets other open indexes. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. schema: @@ -4461,7 +4461,7 @@ components: indices.put_settings::query.ignore_unavailable: in: query name: ignore_unavailable - description: Whether specified concrete indices should be ignored when unavailable (missing or closed). + description: Whether specified concrete indexes should be ignored when unavailable (missing or closed). schema: type: boolean style: form @@ -4546,9 +4546,9 @@ components: in: path name: index description: |- - Comma-separated list of data streams, indices, and aliases used to limit the request. + Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). - To target all data streams and indices, omit this parameter or use `*` or `_all`. + To target all data streams and indexes, omit this parameter or use `*` or `_all`. required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -4573,9 +4573,9 @@ components: in: path name: index description: |- - Comma-separated list of data streams, indices, and aliases used to limit the request. + Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). - To target all data streams and indices, omit this parameter or use `*` or `_all`. + To target all data streams and indexes, omit this parameter or use `*` or `_all`. required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -4584,8 +4584,8 @@ components: in: query name: allow_no_indices description: |- - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. - This behavior applies even if the request targets other open indices. + If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. + This behavior applies even if the request targets other open indexes. schema: type: boolean style: form @@ -4611,7 +4611,7 @@ components: in: path name: name description: |- - Comma-separated name(s) or index pattern(s) of the indices, aliases, and data streams to resolve. + Comma-separated name(s) or index pattern(s) of the indexes, aliases, and data streams to resolve. Resources on remote clusters can be specified using the ``:`` syntax. required: true schema: @@ -4696,9 +4696,9 @@ components: in: path name: index description: |- - Comma-separated list of data streams, indices, and aliases used to limit the request. + Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). - To target all data streams and indices, omit this parameter or use `*` or `_all`. + To target all data streams and indexes, omit this parameter or use `*` or `_all`. required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -4707,8 +4707,8 @@ components: in: query name: allow_no_indices description: |- - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. - This behavior applies even if the request targets other open indices. + If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. + This behavior applies even if the request targets other open indexes. schema: type: boolean style: form @@ -4741,7 +4741,7 @@ components: indices.shard_stores::path.index: in: path name: index - description: List of data streams, indices, and aliases used to limit the request. + description: List of data streams, indexes, and aliases used to limit the request. required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -4751,8 +4751,8 @@ components: name: allow_no_indices description: |- If false, the request returns an error if any wildcard expression, index alias, or _all - value targets only missing or closed indices. This behavior applies even if the request - targets other open indices. + value targets only missing or closed indexes. This behavior applies even if the request + targets other open indexes. schema: type: boolean style: form @@ -4768,7 +4768,7 @@ components: indices.shard_stores::query.ignore_unavailable: in: query name: ignore_unavailable - description: If true, missing or closed indices are not included in the response. + description: If true, missing or closed indexes are not included in the response. schema: type: boolean style: form @@ -5029,7 +5029,7 @@ components: indices.stats::path.index: in: path name: index - description: A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + description: A comma-separated list of index names; use `_all` or empty string to perform the operation on all indexes required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -5080,7 +5080,7 @@ components: indices.stats::query.forbid_closed_indices: in: query name: forbid_closed_indices - description: If true, statistics are not collected from closed indices. + description: If true, statistics are not collected from closed indexes. schema: type: boolean default: true @@ -5150,33 +5150,33 @@ components: indices.upgrade::path.index: name: index in: path - description: Comma-separated list of indices; use `_all` or empty string to perform the operation on all indices. + description: Comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes. schema: type: array - description: Comma-separated list of indices; use `_all` or empty string to perform the operation on all indices. + description: Comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes. items: type: string required: true indices.upgrade::query.allow_no_indices: name: allow_no_indices in: query - description: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified). + description: Whether to ignore if a wildcard indexes expression resolves into no concrete indexes. (This includes `_all` string or when no indexes have been specified). schema: type: boolean - description: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified). + description: Whether to ignore if a wildcard indexes expression resolves into no concrete indexes. (This includes `_all` string or when no indexes have been specified). indices.upgrade::query.expand_wildcards: name: expand_wildcards in: query - description: Whether to expand wildcard expression to concrete indices that are open, closed or both. + description: Whether to expand wildcard expression to concrete indexes that are open, closed or both. schema: $ref: '../schemas/_common.yaml#/components/schemas/ExpandWildcards' indices.upgrade::query.ignore_unavailable: name: ignore_unavailable in: query - description: Whether specified concrete indices should be ignored when unavailable (missing or closed). + description: Whether specified concrete indexes should be ignored when unavailable (missing or closed). schema: type: boolean - description: Whether specified concrete indices should be ignored when unavailable (missing or closed). + description: Whether specified concrete indexes should be ignored when unavailable (missing or closed). indices.upgrade::query.only_ancient_segments: name: only_ancient_segments in: query @@ -5197,9 +5197,9 @@ components: in: path name: index description: |- - Comma-separated list of data streams, indices, and aliases to search. + Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). - To search all data streams or indices, omit this parameter or use `*` or `_all`. + To search all data streams or indexes, omit this parameter or use `*` or `_all`. required: true schema: $ref: '../schemas/_common.yaml#/components/schemas/Indices' @@ -5215,8 +5215,8 @@ components: in: query name: allow_no_indices description: |- - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. - This behavior applies even if the request targets other open indices. + If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. + This behavior applies even if the request targets other open indexes. schema: type: boolean style: form diff --git a/spec/namespaces/ism.yaml b/spec/namespaces/ism.yaml index 9e91d84c7..f2102c4e0 100644 --- a/spec/namespaces/ism.yaml +++ b/spec/namespaces/ism.yaml @@ -399,7 +399,7 @@ components: name: index in: query description: |- - Comma-separated list of data streams, indices, and aliases. + Comma-separated list of data streams, indexes, and aliases. Supports wildcards (`*`). required: true schema: @@ -408,7 +408,7 @@ components: name: index in: path description: |- - Comma-separated list of data streams, indices, and aliases. + Comma-separated list of data streams, indexes, and aliases. Supports wildcards (`*`). required: true schema: @@ -418,7 +418,7 @@ components: name: index in: query description: |- - Comma-separated list of data streams, indices, and aliases. + Comma-separated list of data streams, indexes, and aliases. Supports wildcards (`*`). required: true schema: @@ -427,7 +427,7 @@ components: name: index in: query description: |- - Comma-separated list of data streams, indices, and aliases. + Comma-separated list of data streams, indexes, and aliases. Supports wildcards (`*`). required: true schema: @@ -436,7 +436,7 @@ components: name: index in: path description: |- - Comma-separated list of data streams, indices, and aliases. + Comma-separated list of data streams, indexes, and aliases. Supports wildcards (`*`). required: true schema: @@ -446,7 +446,7 @@ components: name: index in: path description: |- - Comma-separated list of data streams, indices, and aliases. + Comma-separated list of data streams, indexes, and aliases. Supports wildcards (`*`). required: true schema: @@ -456,7 +456,7 @@ components: name: index in: path description: |- - Comma-separated list of data streams, indices, and aliases. + Comma-separated list of data streams, indexes, and aliases. Supports wildcards (`*`). required: true schema: @@ -466,7 +466,7 @@ components: name: index in: query description: |- - Comma-separated list of data streams, indices, and aliases. + Comma-separated list of data streams, indexes, and aliases. Supports wildcards (`*`). required: true schema: @@ -475,7 +475,7 @@ components: name: index in: path description: |- - Comma-separated list of data streams, indices, and aliases. + Comma-separated list of data streams, indexes, and aliases. Supports wildcards (`*`). required: true schema: @@ -485,7 +485,7 @@ components: name: index in: path description: |- - Comma-separated list of data streams, indices, and aliases. + Comma-separated list of data streams, indexes, and aliases. Supports wildcards (`*`). required: true schema: diff --git a/spec/namespaces/knn.yaml b/spec/namespaces/knn.yaml index 77b6a34cb..1a25c1a5d 100644 --- a/spec/namespaces/knn.yaml +++ b/spec/namespaces/knn.yaml @@ -354,10 +354,10 @@ components: knn.search_models::query.allow_no_indices: name: allow_no_indices in: query - description: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified). + description: Whether to ignore if a wildcard indexes expression resolves into no concrete indexes. (This includes `_all` string or when no indexes have been specified). schema: type: boolean - description: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified). + description: Whether to ignore if a wildcard indexes expression resolves into no concrete indexes. (This includes `_all` string or when no indexes have been specified). knn.search_models::query.allow_partial_search_results: name: allow_partial_search_results in: query @@ -425,7 +425,7 @@ components: knn.search_models::query.expand_wildcards: name: expand_wildcards in: query - description: Whether to expand wildcard expression to concrete indices that are open, closed or both. + description: Whether to expand wildcard expression to concrete indexes that are open, closed or both. schema: $ref: '../schemas/_common.yaml#/components/schemas/ExpandWildcards' knn.search_models::query.explain: @@ -447,17 +447,17 @@ components: knn.search_models::query.ignore_throttled: name: ignore_throttled in: query - description: Whether specified concrete, expanded or aliased indices should be ignored when throttled. + description: Whether specified concrete, expanded or aliased indexes should be ignored when throttled. schema: type: boolean - description: Whether specified concrete, expanded or aliased indices should be ignored when throttled. + description: Whether specified concrete, expanded or aliased indexes should be ignored when throttled. knn.search_models::query.ignore_unavailable: name: ignore_unavailable in: query - description: Whether specified concrete indices should be ignored when unavailable (missing or closed). + description: Whether specified concrete indexes should be ignored when unavailable (missing or closed). schema: type: boolean - description: Whether specified concrete indices should be ignored when unavailable (missing or closed). + description: Whether specified concrete indexes should be ignored when unavailable (missing or closed). knn.search_models::query.lenient: name: lenient in: query @@ -724,10 +724,10 @@ components: knn.warmup::path.index: name: index in: path - description: Comma-separated list of indices; use `_all` or empty string to perform the operation on all indices. + description: Comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes. schema: type: array - description: Comma-separated list of indices; use `_all` or empty string to perform the operation on all indices. + description: Comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes. items: type: string required: true diff --git a/spec/namespaces/nodes.yaml b/spec/namespaces/nodes.yaml index 236a2a8ec..37b49cf1b 100644 --- a/spec/namespaces/nodes.yaml +++ b/spec/namespaces/nodes.yaml @@ -506,7 +506,7 @@ components: nodes.stats::path.index_metric: in: path name: index_metric - description: Limit the information returned for indices metric to the specific index metrics. It can be used only if indices (or all) metric is specified. + description: Limit the information returned for indexes metric to the specific index metrics. It can be used only if indexes (or all) metric is specified. required: true schema: type: array diff --git a/spec/namespaces/security.yaml b/spec/namespaces/security.yaml index 77dc0c6f6..173344688 100644 --- a/spec/namespaces/security.yaml +++ b/spec/namespaces/security.yaml @@ -362,7 +362,7 @@ paths: x-distributions-excluded: - amazon-managed - amazon-serverless - description: Creates or replaces the allowlisted APIs. Accessible via Super Admin certificate or REST API permission. + description: Creates or replaces the permitted APIs. Accessible using Super Admin certificate or REST API permission. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#access-control-for-the-api requestBody: diff --git a/spec/namespaces/snapshot.yaml b/spec/namespaces/snapshot.yaml index d81a5b173..b24c49466 100644 --- a/spec/namespaces/snapshot.yaml +++ b/spec/namespaces/snapshot.yaml @@ -223,7 +223,7 @@ paths: operationId: snapshot.clone.0 x-operation-group: snapshot.clone x-version-added: '1.0' - description: Clones indices from one snapshot into another snapshot in the same repository. + description: Clones indexes from one snapshot into another snapshot in the same repository. externalDocs: url: https://opensearch.org/docs/latest parameters: @@ -294,22 +294,22 @@ components: type: object properties: ignore_unavailable: - description: If `true`, the request ignores data streams and indices in `indices` that are missing or closed. If `false`, the request returns an error for any data stream or index that is missing or closed. + description: If `true`, the request ignores data streams and indexes in `indices` that are missing or closed. If `false`, the request returns an error for any data stream or index that is missing or closed. type: boolean include_global_state: - description: If `true`, the current cluster state is included in the snapshot. The cluster state includes persistent cluster settings, composable index templates, legacy index templates, ingest pipelines, and ILM policies. It also includes data stored in system indices, such as Watches and task records (configurable via `feature_states`). + description: If `true`, the current cluster state is included in the snapshot. The cluster state includes persistent cluster settings, composable index templates, legacy index templates, ingest pipelines, and ILM policies. It also includes data stored in system indexes, such as Watches and task records (configurable with `feature_states`). type: boolean indices: $ref: '../schemas/_common.yaml#/components/schemas/Indices' feature_states: - description: Feature states to include in the snapshot. Each feature state includes one or more system indices containing related data. You can view a list of eligible features using the get features API. If `include_global_state` is `true`, all current feature states are included by default. If `include_global_state` is `false`, no feature states are included by default. + description: Feature states to include in the snapshot. Each feature state includes one or more system indexes containing related data. You can view a list of eligible features using the get features API. If `include_global_state` is `true`, all current feature states are included by default. If `include_global_state` is `false`, no feature states are included by default. type: array items: type: string metadata: $ref: '../schemas/_common.yaml#/components/schemas/Metadata' partial: - description: If `true`, allows restoring a partial snapshot of indices with unavailable shards. Only shards that were successfully included in the snapshot will be restored. All missing shards will be recreated as empty. If `false`, the entire restore operation will fail if one or more indices included in the snapshot do not have all primary shards available. + description: If `true`, allows restoring a partial snapshot of indexes with unavailable shards. Only shards that were successfully included in the snapshot will be restored. All missing shards will be recreated as empty. If `false`, the entire restore operation will fail if one or more indexes included in the snapshot do not have all primary shards available. type: boolean description: The snapshot definition snapshot.create_repository: diff --git a/spec/schemas/_common.query_dsl.yaml b/spec/schemas/_common.query_dsl.yaml index b8e43a867..e1e05cb42 100644 --- a/spec/schemas/_common.query_dsl.yaml +++ b/spec/schemas/_common.query_dsl.yaml @@ -760,7 +760,7 @@ components: $ref: '#/components/schemas/IgnoreUnmapped' description: |- Indicates whether to ignore an unmapped `parent_type` and not return any documents instead of an error. - You can use this parameter to query multiple indices that may not contain the `parent_type`. + You can use this parameter to query multiple indexes that may not contain the `parent_type`. inner_hits: $ref: '_core.search.yaml#/components/schemas/InnerHits' parent_type: diff --git a/spec/schemas/_common.yaml b/spec/schemas/_common.yaml index 883ac273a..5ef209d8a 100644 --- a/spec/schemas/_common.yaml +++ b/spec/schemas/_common.yaml @@ -429,16 +429,16 @@ components: description: Match any index, including hidden ones. - type: string const: closed - description: Match closed, non-hidden indices. + description: Match closed, non-hidden indexes. - type: string const: hidden - description: Match hidden indices. Must be combined with open, closed, or both. + description: Match hidden indexes. Must be combined with open, closed, or both. - type: string const: none description: Wildcard expressions are not accepted. - type: string const: open - description: Match open, non-hidden indices. + description: Match open, non-hidden indexes. VersionString: type: string SearchType: diff --git a/spec/schemas/asynchronous_search._common.yaml b/spec/schemas/asynchronous_search._common.yaml index ce677af0a..f103db5bd 100644 --- a/spec/schemas/asynchronous_search._common.yaml +++ b/spec/schemas/asynchronous_search._common.yaml @@ -67,7 +67,7 @@ components: track_total_hits: $ref: '_core.search.yaml#/components/schemas/TrackHits' indices_boost: - description: Boosts the _score of documents from specified indices. + description: Boosts the `_score` of documents from specified indexes. type: array items: type: object @@ -132,7 +132,7 @@ components: Use with caution. OpenSearch applies this parameter to each shard handling the request. When possible, let OpenSearch perform early termination automatically. - Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers. + Avoid specifying this parameter for requests that target data streams with backing indexes across multiple data tiers. If set to `0` (default), the query does not terminate early. type: integer format: int32 @@ -159,7 +159,7 @@ components: description: |- Stats groups to associate with the search. Each group maintains a statistics aggregation for its associated searches. - You can retrieve these stats using the indices stats API. + You can retrieve these stats using the indexes stats API. type: array items: type: string diff --git a/spec/schemas/cat.snapshots.yaml b/spec/schemas/cat.snapshots.yaml index af46e1ba2..df5b3acd9 100644 --- a/spec/schemas/cat.snapshots.yaml +++ b/spec/schemas/cat.snapshots.yaml @@ -36,7 +36,7 @@ components: duration: $ref: '_common.yaml#/components/schemas/Duration' indices: - description: The number of indices in the snapshot. + description: The number of indexes in the snapshot. type: string successful_shards: description: The number of successful shards in the snapshot. diff --git a/spec/schemas/cluster.stats.yaml b/spec/schemas/cluster.stats.yaml index 3e8cb8987..34f983c14 100644 --- a/spec/schemas/cluster.stats.yaml +++ b/spec/schemas/cluster.stats.yaml @@ -37,7 +37,7 @@ components: completion: $ref: '_common.yaml#/components/schemas/CompletionStats' count: - description: Total number of indices with shards assigned to selected nodes. + description: Total number of indexes with shards assigned to selected nodes. type: number docs: $ref: '_common.yaml#/components/schemas/DocStats' @@ -119,7 +119,7 @@ components: description: The number of occurrences of the field type in selected nodes. type: number index_count: - description: The number of indices containing the field type in selected nodes. + description: The number of indexes containing the field type in selected nodes. type: number indexed_vector_count: description: For dense_vector field types, number of indexed vector types in selected nodes. @@ -192,7 +192,7 @@ components: description: Total number of fields in all non-system indices. type: number total_deduplicated_field_count: - description: Total number of fields in all non-system indices, accounting for mapping deduplication. + description: Total number of fields in all non-system indexes, accounting for mapping deduplication. type: number total_deduplicated_mapping_size: $ref: '_common.yaml#/components/schemas/HumanReadableByteCount' diff --git a/spec/schemas/indices._common.yaml b/spec/schemas/indices._common.yaml index 6135bd368..0041d7d7f 100644 --- a/spec/schemas/indices._common.yaml +++ b/spec/schemas/indices._common.yaml @@ -386,7 +386,7 @@ components: description: |- The index alias to update when the index rolls over. Specify when using a policy that contains a rollover action. When the index rolls over, the alias is updated to reflect that the index is no longer the write index. For more - information about rolling indices, see Rollover. + information about rolling indexes, see Rollover. type: string required: - name @@ -708,7 +708,7 @@ components: $ref: '#/components/schemas/StorageType' allow_mmap: description: |- - You can restrict the use of the mmapfs and the related hybridfs store type via the setting node.store.allow_mmap. + You can restrict the use of the `mmapfs` and the related `hybridfs` store types with the setting `node.store.allow_mmap`. This is a boolean setting indicating whether or not memory-mapping is allowed. The default is to allow it. This setting is useful, for example, if you are in an environment where you can not control the ability to create a lot of memory maps so you need disable the ability to use memory-mapping. @@ -773,7 +773,7 @@ components: is_hidden: description: |- If `true`, the alias is hidden. - All indices for the alias must have the same `is_hidden` value. + All indexes for the alias must have the same `is_hidden` value. type: boolean IndexState: type: object @@ -800,7 +800,7 @@ components: is_hidden: description: |- If `true`, the alias is hidden. - All indices for the alias must have the same `is_hidden` value. + All indexes for the alias must have the same `is_hidden` value. type: boolean is_write_index: description: If `true`, the index is the write index for the alias. @@ -832,7 +832,7 @@ components: type: boolean indices: description: |- - Array of objects containing information about the data stream's backing indices. + Array of objects containing information about the data stream's backing indexes. The last item in this array contains information about the stream's current write index. type: array items: diff --git a/spec/schemas/indices.data_streams_stats.yaml b/spec/schemas/indices.data_streams_stats.yaml index f8309bb2e..db7a59a39 100644 --- a/spec/schemas/indices.data_streams_stats.yaml +++ b/spec/schemas/indices.data_streams_stats.yaml @@ -10,7 +10,7 @@ components: type: object properties: backing_indices: - description: Current number of backing indices for the data stream. + description: Current number of backing indexes for the data stream. type: number data_stream: $ref: '_common.yaml#/components/schemas/Name' diff --git a/spec/schemas/insights._common.yaml b/spec/schemas/insights._common.yaml index 66b0bbe47..f7180c7b4 100644 --- a/spec/schemas/insights._common.yaml +++ b/spec/schemas/insights._common.yaml @@ -50,7 +50,7 @@ components: type: array items: type: string - description: The indices involved in the query. + description: The indexes involved in the query. phase_latency_map: type: object measurements: @@ -111,7 +111,7 @@ components: track_total_hits: $ref: '_core.search.yaml#/components/schemas/TrackHits' indices_boost: - description: Boosts the _score of documents from specified indices. + description: Boosts the `_score` of documents from specified indexes. type: array items: type: object @@ -174,7 +174,7 @@ components: Use with caution. OpenSearch applies this parameter to each shard handling the request. When possible, let OpenSearch perform early termination automatically. - Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers. + Avoid specifying this parameter for requests that target data streams with backing indexes across multiple data tiers. If set to `0` (default), the query does not terminate early. type: integer format: int32 @@ -201,7 +201,7 @@ components: description: |- Stats groups to associate with the search. Each group maintains a statistics aggregation for its associated searches. - You can retrieve these stats using the indices stats API. + You can retrieve these stats using the indexes stats API. type: array items: type: string diff --git a/tests/default/_core/refresh.yaml b/tests/default/_core/refresh.yaml index 5a4a42f74..986411755 100644 --- a/tests/default/_core/refresh.yaml +++ b/tests/default/_core/refresh.yaml @@ -3,7 +3,7 @@ $schema: ../../../json_schemas/test_story.schema.yaml description: Test _refresh. chapters: - - synopsis: Refresh all indices in the cluster. + - synopsis: Refresh all indexes in the cluster. path: /_refresh method: GET response: diff --git a/tests/default/cat/segments.yaml b/tests/default/cat/segments.yaml index c01bbdbbe..626eb82f0 100644 --- a/tests/default/cat/segments.yaml +++ b/tests/default/cat/segments.yaml @@ -11,7 +11,7 @@ epilogues: method: DELETE status: [200, 404] chapters: - - synopsis: List Lucene segment-level information for all indices. + - synopsis: List Lucene segment-level information for all indexes. path: /_cat/segments method: GET parameters: diff --git a/tests/default/indices/mapping.yaml b/tests/default/indices/mapping.yaml index 635ffe5cc..ea0fce71b 100644 --- a/tests/default/indices/mapping.yaml +++ b/tests/default/indices/mapping.yaml @@ -41,7 +41,7 @@ chapters: type: text year: type: integer - - synopsis: Get mappings for multiple indices. + - synopsis: Get mappings for multiple indexes. path: /{index}/_mapping method: GET parameters: diff --git a/tests/default/ism/explain.yaml b/tests/default/ism/explain.yaml index f3cf7654d..143feb25d 100644 --- a/tests/default/ism/explain.yaml +++ b/tests/default/ism/explain.yaml @@ -26,10 +26,10 @@ prologues: payload: policy_id: ${policy.id} chapters: - - synopsis: Get the total managed indices count (GET). + - synopsis: Get the total managed indexes count (GET). path: /_plugins/_ism/explain method: GET - - synopsis: Get the total managed indices count (POST). + - synopsis: Get the total managed indexes count (POST). version: '>= 2.12' path: /_plugins/_ism/explain method: POST diff --git a/tests/default/security/api/internalusers/authtoken.yaml b/tests/default/security/api/internalusers/authtoken.yaml index 08f7a40d8..b2150f8a9 100644 --- a/tests/default/security/api/internalusers/authtoken.yaml +++ b/tests/default/security/api/internalusers/authtoken.yaml @@ -1,7 +1,7 @@ $schema: ../../../../../json_schemas/test_story.schema.yaml description: Test internalusers/authtoken endpoint. -version: '> 2.16' # Fixed via https://github.com/opensearch-project/security/pull/4628 +version: '> 2.16' # Fixed in https://github.com/opensearch-project/security/pull/4628 distributions: excluded: - amazon-managed diff --git a/tests/default/security/api/securityconfig/config.yaml b/tests/default/security/api/securityconfig/config.yaml index 050fff9a9..8b888f277 100644 --- a/tests/default/security/api/securityconfig/config.yaml +++ b/tests/default/security/api/securityconfig/config.yaml @@ -37,7 +37,7 @@ chapters: authentication_backend: type: intern config: {} - description: Authenticate via HTTP Basic against internal users database + description: Authenticate using HTTP Basic against internal users database. auth_failure_listeners: {} do_not_fail_on_forbidden: false multi_rolespan_enabled: true diff --git a/tests/default/security/api/user/authtoken.yaml b/tests/default/security/api/user/authtoken.yaml index 8df0c3574..8d6176d54 100644 --- a/tests/default/security/api/user/authtoken.yaml +++ b/tests/default/security/api/user/authtoken.yaml @@ -1,7 +1,7 @@ $schema: ../../../../../json_schemas/test_story.schema.yaml description: Test authtoken endpoints for user. -version: '> 2.16' # Fixed via https://github.com/opensearch-project/security/pull/4628 +version: '> 2.16' # Fixed in https://github.com/opensearch-project/security/pull/4628 distributions: excluded: - amazon-managed diff --git a/tests/default/security/authinfo.yaml b/tests/default/security/authinfo.yaml index 5243a3f6a..b2997ea13 100644 --- a/tests/default/security/authinfo.yaml +++ b/tests/default/security/authinfo.yaml @@ -12,7 +12,7 @@ chapters: version: < 2.13 response: status: 200 - - synopsis: Get auth info via POST. + - synopsis: Get auth info using POST. path: /_plugins/_security/authinfo method: POST version: < 2.13 diff --git a/tests/default/security/dashboardsinfo.yaml b/tests/default/security/dashboardsinfo.yaml index 6bcfd4b44..e611a8e46 100644 --- a/tests/default/security/dashboardsinfo.yaml +++ b/tests/default/security/dashboardsinfo.yaml @@ -11,7 +11,7 @@ chapters: method: GET response: status: 200 - - synopsis: Get dashboards info via POST. + - synopsis: Get dashboards info using POST. path: /_plugins/_security/dashboardsinfo method: POST response: diff --git a/tests/default/security/health.yaml b/tests/default/security/health.yaml index cbd8e9c5a..8c9481bf7 100644 --- a/tests/default/security/health.yaml +++ b/tests/default/security/health.yaml @@ -17,7 +17,7 @@ chapters: message: null mode: strict status: UP - - synopsis: Get security health info via POST. + - synopsis: Get security health info using POST. path: /_plugins/_security/health method: POST parameters: diff --git a/tests/default/security/tenantinfo.yaml b/tests/default/security/tenantinfo.yaml index c113a1de7..f1dd7b2a7 100644 --- a/tests/default/security/tenantinfo.yaml +++ b/tests/default/security/tenantinfo.yaml @@ -12,7 +12,7 @@ chapters: response: status: 403 # only allowed for super-admin or dashboards-server role mapping content_type: text/plain - - synopsis: Get tenant info via POST. + - synopsis: Get tenant info using POST. path: /_plugins/_security/tenantinfo method: POST response: diff --git a/tests/default/security/whoami.yaml b/tests/default/security/whoami.yaml index dc6c42c37..2ea1f643b 100644 --- a/tests/default/security/whoami.yaml +++ b/tests/default/security/whoami.yaml @@ -16,7 +16,7 @@ chapters: dn: null is_admin: false is_node_certificate_request: false - - synopsis: Get current user info via POST. + - synopsis: Get current user info using POST. path: /_plugins/_security/whoami method: POST response: diff --git a/tools/tests/merger/fixtures/extractor/opensearch/expected_1.3.yaml b/tools/tests/merger/fixtures/extractor/opensearch/expected_1.3.yaml index eafc740f0..cd228a3c3 100644 --- a/tools/tests/merger/fixtures/extractor/opensearch/expected_1.3.yaml +++ b/tools/tests/merger/fixtures/extractor/opensearch/expected_1.3.yaml @@ -114,13 +114,13 @@ components: type: object description: '' info___added-1.3-removed-2.0: - description: Added in 1.3, removed in 2.0 via attribute in response body. + description: Added in 1.3, removed in 2.0 using an attribute in response body. x-version-added: '1.3' x-version-removed: '2.0' info___distributed-all: description: Distributed in opensearch.org, AOS and AOSS. info___removed-2.0: - description: Removed in 2.0 via attribute next to ref. + description: Removed in 2.0 using an attribute next to ref. info___removed-2.0-refs: description: One of the ref values removed in 2.0. schema: diff --git a/tools/tests/merger/fixtures/extractor/opensearch/expected_2.0.yaml b/tools/tests/merger/fixtures/extractor/opensearch/expected_2.0.yaml index b287d6982..85878c3ae 100644 --- a/tools/tests/merger/fixtures/extractor/opensearch/expected_2.0.yaml +++ b/tools/tests/merger/fixtures/extractor/opensearch/expected_2.0.yaml @@ -154,7 +154,7 @@ components: type: object description: '' info___added-2.0: - description: Added in 2.0 via attribute next to ref. + description: Added in 2.0 using an attribute next to ref. info___distributed-all: description: Distributed in opensearch.org, AOS and AOSS. info___removed-2.0-refs: diff --git a/tools/tests/merger/fixtures/specs/opensearch/namespaces/index.yaml b/tools/tests/merger/fixtures/specs/opensearch/namespaces/index.yaml index f03058350..80a2e0c6d 100644 --- a/tools/tests/merger/fixtures/specs/opensearch/namespaces/index.yaml +++ b/tools/tests/merger/fixtures/specs/opensearch/namespaces/index.yaml @@ -82,9 +82,9 @@ components: unevaluatedProperties: type: object info@added-2.0: - description: Added in 2.0 via attribute next to ref. + description: Added in 2.0 using an attribute next to ref. info@removed-2.0: - description: Removed in 2.0 via attribute next to ref. + description: Removed in 2.0 using an attribute next to ref. info@removed-2.0-refs: description: One of the ref values removed in 2.0. schema: @@ -92,11 +92,11 @@ components: - $ref: '../schemas/_common.yaml#/components/schemas/Type' - $ref: '../schemas/_common.yaml#/components/schemas/OldId' info@added-1.3-removed-2.0: - description: Added in 1.3, removed in 2.0 via attribute in response body. + description: Added in 1.3, removed in 2.0 using an attribute in response body. x-version-added: '1.3' x-version-removed: '2.0' info@added-2.1: - description: Added in 2.1 via attribute in response body. + description: Added in 2.1 using an attribute in response body. x-version-added: '2.1' info@distributed-amazon-managed: description: Distributed only in AOS. diff --git a/tools/tests/tester/fixtures/specs/complete/namespaces/index.yaml b/tools/tests/tester/fixtures/specs/complete/namespaces/index.yaml index 0c0a09234..111c6d772 100644 --- a/tools/tests/tester/fixtures/specs/complete/namespaces/index.yaml +++ b/tools/tests/tester/fixtures/specs/complete/namespaces/index.yaml @@ -80,15 +80,15 @@ components: unevaluatedProperties: type: object info@added-2.0: - description: Added in 2.0 via attribute next to ref. + description: Added in 2.0 using an attribute next to ref. info@removed-2.0: - description: Removed in 2.0 via attribute next to ref. + description: Removed in 2.0 using an attribute next to ref. info@added-1.3-removed-2.0: - description: Added in 1.3, removed in 2.0 via attribute in response body. + description: Added in 1.3, removed in 2.0 using an attribute in response body. x-version-added: '1.3' x-version-removed: '2.0' info@added-2.1: - description: Added in 2.1 via attribute in response body. + description: Added in 2.1 using an attribute in response body. x-version-added: '2.1' info@distributed-amazon-managed: description: Distributed only in AOS. diff --git a/tools/tests/tester/fixtures/specs/excerpt.yaml b/tools/tests/tester/fixtures/specs/excerpt.yaml index 5ff3c005e..6b28883ab 100644 --- a/tools/tests/tester/fixtures/specs/excerpt.yaml +++ b/tools/tests/tester/fixtures/specs/excerpt.yaml @@ -31,7 +31,7 @@ paths: operationId: cat.indices.1 x-operation-group: cat.indices x-version-added: '1.0' - description: 'Returns information about indices: number of primaries and replicas, document counts, disk size, ...' + description: 'Returns information about indexes: number of primaries and replicas, document counts, disk size, ...' externalDocs: url: https://opensearch.org/docs/latest/api-reference/cat/cat-indices/ parameters: @@ -201,8 +201,8 @@ components: in: path name: index description: |- - Comma-separated list of data streams, indices, and aliases used to limit the request. - Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. + Comma-separated list of data streams, indexes, and aliases used to limit the request. + Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. required: true schema: $ref: '#/components/schemas/_common:Indices' @@ -216,7 +216,7 @@ components: in: path name: index description: |- - Comma-separated list of indices to delete. + Comma-separated list of indexes to delete. You cannot specify index aliases. By default, this parameter does not support wildcards (`*`) or `_all`. To use wildcards or `_all`, set the `action.destructive_requires_name` cluster setting to `false`. @@ -235,7 +235,7 @@ components: indices.exists::path.index: in: path name: index - description: Comma-separated list of data streams, indices, and aliases. Supports wildcards (`*`). + description: Comma-separated list of data streams, indexes, and aliases. Supports wildcards (`*`). required: true schema: $ref: '#/components/schemas/_common:Indices' From bf356019ed3450d97fb4f9f68be4db86d1ed2195 Mon Sep 17 00:00:00 2001 From: nathaliellenaa <143617992+nathaliellenaa@users.noreply.github.com> Date: Sat, 16 Nov 2024 05:27:30 -0800 Subject: [PATCH 16/16] Add missing tests for ML APIs (search and delete) (#672) * Add missing tests for ML APIs (search and delete) Signed-off-by: Nathalie Jonathan * Update schema and CHANGELOG Signed-off-by: Nathalie Jonathan * Removed comments Signed-off-by: Nathalie Jonathan * Added missing model states Signed-off-by: Nathalie Jonathan * Fixed lint errors and modified distributions Signed-off-by: Nathalie Jonathan * Added refresh and updated response schema Signed-off-by: Nathalie Jonathan * Modified refresh Signed-off-by: Nathalie Jonathan * Updated CHANGELOG and modified search model Signed-off-by: Nathalie Jonathan * Added more missing fields Signed-off-by: Nathalie Jonathan --------- Signed-off-by: Nathalie Jonathan Signed-off-by: Daniel (dB.) Doubrovkine Co-authored-by: Daniel (dB.) Doubrovkine --- CHANGELOG.md | 1 + spec/schemas/ml._common.yaml | 149 ++++++++++++++++++++++++++++++-- tests/plugins/ml/ml/models.yaml | 14 +++ tests/plugins/ml/ml/tasks.yaml | 28 ++++++ 4 files changed, 185 insertions(+), 7 deletions(-) create mode 100644 tests/plugins/ml/ml/tasks.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f24a2b46..045729721 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Removed invalid `required` from `ppl` responses ([#646](https://github.com/opensearch-project/opensearch-api-specification/pull/646)) - Added schema for security API error responses ([#646](https://github.com/opensearch-project/opensearch-api-specification/pull/646)) - Fixed `/{index}/_create/{id}` returning `201` ([#669](https://github.com/opensearch-project/opensearch-api-specification/pull/669)) +- Fixed `ml._common.yaml#SearchModelsResponse` and `SearchModelsHitsHit` ([#672](https://github.com/opensearch-project/opensearch-api-specification/pull/672)) ## [0.1.0] - 2024-10-25 diff --git a/spec/schemas/ml._common.yaml b/spec/schemas/ml._common.yaml index 46cffc9f3..36f6c4954 100644 --- a/spec/schemas/ml._common.yaml +++ b/spec/schemas/ml._common.yaml @@ -22,6 +22,14 @@ components: SearchModelsResponse: type: object properties: + took: + type: integer + description: The time taken to execute the search. + timed_out: + type: boolean + description: Whether the search timed out. + _shards: + $ref: '_common.yaml#/components/schemas/ShardStatistics' hits: $ref: '#/components/schemas/SearchModelsHits' required: @@ -35,6 +43,10 @@ components: type: array items: $ref: '#/components/schemas/SearchModelsHitsHit' + max_score: + type: number + format: float + description: The maximum score. required: - hits - total @@ -43,6 +55,7 @@ components: properties: value: type: integer + format: int64 description: The total number of hits. relation: type: string @@ -53,18 +66,140 @@ components: SearchModelsHitsHit: type: object properties: + _version: + $ref: '_common.yaml#/components/schemas/VersionNumber' + _seq_no: + $ref: '_common.yaml#/components/schemas/SequenceNumber' + _primary_term: + type: integer + description: The primary term. _index: - type: string - description: The index. + $ref: '_common.yaml#/components/schemas/IndexName' _id: + $ref: '_common.yaml#/components/schemas/Id' + _score: + type: number + format: float + description: The score. + _source: + $ref: '#/components/schemas/Source' + model_id: + $ref: '_common.yaml#/components/schemas/Name' + required: + - _score + Source: + type: object + properties: + last_deployed_time: + type: integer + format: int64 + description: The last deployed time. + model_version: type: string - description: The hit ID. + description: The model version. + version: + $ref: '_common.yaml#/components/schemas/VersionString' + created_time: + type: integer + format: int64 + description: The created time. + chunk_number: + type: integer + format: int64 + description: The chunk number. + deploy_to_all_nodes: + type: boolean + description: Whether to deploy to all nodes. + is_hidden: + type: boolean + description: Whether the model is hidden. model_id: + $ref: '_common.yaml#/components/schemas/Name' + description: type: string - description: The model ID. - required: - - _id - - model_id + description: The model description. + model_state: + type: string + description: The model state. + enum: + - DEPLOYED + - DEPLOYING + - DEPLOY_FAILED + - PARTIALLY_DEPLOYED + - REGISTERED + - REGISTERING + model_content_size_in_bytes: + type: integer + format: int64 + description: The model content size in bytes. + model_content_hash_value: + type: string + description: The model content hash value. + planning_worker_node_count: + type: number + description: The planning worker node count. + model_config: + $ref: '#/components/schemas/ModelConfig' + model_format: + type: string + description: The model format. + model_task_type: + type: string + description: The model task type. + last_updated_time: + type: integer + format: int64 + description: The last updated time. + last_registered_time: + type: integer + format: int64 + description: The last registered time. + auto_redeploy_retry_times: + type: integer + format: int64 + description: The auto redeploy retry times. + name: + type: string + description: The model name. + connector_id: + type: string + description: The connector ID. + current_worker_node_count: + type: number + description: The current worker node count. + model_group_id: + type: string + description: The model group ID. + planning_worker_nodes: + type: array + items: + $ref: '_common.yaml#/components/schemas/NodeIds' + total_chunks: + type: integer + format: int64 + description: The total chunks. + algorithm: + type: string + description: The algorithm. + url: + type: string + description: The model URL. + ModelConfig: + type: object + properties: + all_config: + type: string + description: The all config. + model_type: + type: string + description: The model type. + embedding_dimension: + type: integer + format: int64 + description: The embedding dimension. + framework_type: + type: string + description: The framework type. ModelGroupRegistration: type: object properties: diff --git a/tests/plugins/ml/ml/models.yaml b/tests/plugins/ml/ml/models.yaml index ce087654f..92cac3ca3 100644 --- a/tests/plugins/ml/ml/models.yaml +++ b/tests/plugins/ml/ml/models.yaml @@ -37,6 +37,20 @@ chapters: retry: count: 5 wait: 30000 + - synopsis: Search model. + path: /_plugins/_ml/models/_search + method: GET + request: + payload: + query: + match_all: {} + size: 1000 + response: + status: 200 + payload: + hits: + hits: + - _score: 1 - synopsis: Delete model. path: /_plugins/_ml/models/{model_id} parameters: diff --git a/tests/plugins/ml/ml/tasks.yaml b/tests/plugins/ml/ml/tasks.yaml new file mode 100644 index 000000000..542ea3468 --- /dev/null +++ b/tests/plugins/ml/ml/tasks.yaml @@ -0,0 +1,28 @@ +$schema: ../../../../json_schemas/test_story.schema.yaml + +description: Test the creation of tasks. +version: '>= 2.11' +warnings: + multiple-paths-detected: false +chapters: + - synopsis: Register model. + id: register_model + path: /_plugins/_ml/models/_register + method: POST + request: + payload: + name: huggingface/sentence-transformers/msmarco-distilbert-base-tas-b + version: 1.0.1 + model_format: TORCH_SCRIPT + response: + status: 200 + output: + task_id: payload.task_id + - synopsis: Delete task. + id: delete_task + path: /_plugins/_ml/tasks/{task_id} + method: DELETE + parameters: + task_id: ${register_model.task_id} + response: + status: 200 \ No newline at end of file