diff --git a/CHANGELOG.md b/CHANGELOG.md index c48b84ea..0ced7526 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -85,7 +85,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Added `AwarenessAttributeStats` to `/_cluster/health` ([#534](https://github.com/opensearch-project/opensearch-api-specification/pull/534)) - Added `cache_reserved_in_bytes` to `ClusterFileSystem` ([#534](https://github.com/opensearch-project/opensearch-api-specification/pull/534)) - Added `cluster_manager` to `ClusterNodeCount` ([#534](https://github.com/opensearch-project/opensearch-api-specification/pull/534)) -- Added support for `query` with `terms` in `_search` ([#546](https://github.com/opensearch-project/opensearch-api-specification/pull/546)) +- Added support for `query` with `terms` in `_search` ([#546](https://github.com/opensearch-project/opensearch-api-specification/pull/546))([#564](https://github.com/opensearch-project/opensearch-api-specification/pull/564)) - Added `h`, `bytes`, `time` parameters to cat API tests ([#551](https://github.com/opensearch-project/opensearch-api-specification/pull/551)) - Added `terminated_early` to `count@200` ([#547](https://github.com/opensearch-project/opensearch-api-specification/pull/547)) - Added request and response schemas for `/_cluster/routing/awareness/{attribute}/weights` ([#524](https://github.com/opensearch-project/opensearch-api-specification/pull/524)) diff --git a/spec/schemas/_common.query_dsl.yaml b/spec/schemas/_common.query_dsl.yaml index c532ef26..c4852c84 100644 --- a/spec/schemas/_common.query_dsl.yaml +++ b/spec/schemas/_common.query_dsl.yaml @@ -190,7 +190,15 @@ components: minProperties: 1 maxProperties: 1 terms: - $ref: '#/components/schemas/TermsQuery' + type: object + additionalProperties: + anyOf: + - $ref: '#/components/schemas/TermsQuery' + - type: array + items: + type: string + minProperties: 1 + maxProperties: 1 terms_set: description: |- Returns documents that contain a minimum number of exact terms in a provided field. @@ -280,23 +288,6 @@ components: type: number _name: type: string - Terms: - oneOf: - - type: array - items: - type: string - - type: object - properties: - index: - $ref: '_common.yaml#/components/schemas/IndexName' - id: - $ref: '_common.yaml#/components/schemas/Id' - path: - $ref: '_common.yaml#/components/schemas/Field' - routing: - $ref: '_common.yaml#/components/schemas/Routing' - additionalProperties: true - description: Object for fetching terms. BoostingQuery: allOf: - $ref: '#/components/schemas/QueryBase' @@ -1891,7 +1882,16 @@ components: TermsQuery: anyOf: - $ref: '#/components/schemas/QueryBase' - - $ref: '#/components/schemas/Terms' + - type: object + properties: + index: + $ref: '_common.yaml#/components/schemas/IndexName' + id: + $ref: '_common.yaml#/components/schemas/Id' + path: + $ref: '_common.yaml#/components/schemas/Field' + routing: + $ref: '_common.yaml#/components/schemas/Routing' TermsSetQuery: allOf: - $ref: '#/components/schemas/QueryBase' @@ -1902,7 +1902,9 @@ components: minimum_should_match_script: $ref: '_common.yaml#/components/schemas/Script' terms: - $ref: '#/components/schemas/Terms' + type: array + items: + type: string required: - terms TextExpansionQuery: