Skip to content

Commit

Permalink
Added aggs property as an alias to aggregations in requestBody of…
Browse files Browse the repository at this point in the history
… `search`

Signed-off-by: Theo Truong <[email protected]>
  • Loading branch information
nhtruong committed Jan 9, 2025
1 parent 2b44e52 commit 896052e
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added `GET /_plugins/_ml/connectors/{connector_id}`, `_search`, `POST /_plugins/_ml/connectors/_search`, and `PUT /_plugins/_ml/connectors/{connector_id}` ([#764](https://github.com/opensearch-project/opensearch-api-specification/pull/764))
- Added the ability to skip an individual chapter test ([#765](https://github.com/opensearch-project/opensearch-api-specification/pull/765))
- Added uploading of test spec logs ([#767](https://github.com/opensearch-project/opensearch-api-specification/pull/767))
- Added `aggs` property as an alias to `aggregations` in requestBody of `search` [#774](https://github.com/opensearch-project/opensearch-api-specification/issues/774)
- Added `POST /_plugins/_ml/memory`, `POST /_plugins/_ml/memory/_search`, `{memory_id}/_search`, `{memory_id}/messages`, `PUT /_plugins/_ml/memory/{memory_id}`, `message/{message_id}`, `GET /_plugins/_ml/memory`, `GET /_plugins/_ml/memory/{memory_id}`, `_search`, `message/{message_id}`, `{memory_id}/messages`, `{memory_id}/_search`, `message/{message_id}/traces`, and `DELETE /_plugins/_ml/memory/{memory_id}` ([#771](https://github.com/opensearch-project/opensearch-api-specification/pull/771))
- Added support for evaluating response payloads in prologues and epilogues ([#772](https://github.com/opensearch-project/opensearch-api-specification/pull/772))

Expand Down
5 changes: 5 additions & 0 deletions spec/namespaces/_core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2538,6 +2538,11 @@ components:
type: object
additionalProperties:
$ref: '../schemas/_common.aggregations.yaml#/components/schemas/AggregationContainer'
aggs:
description: Defines the aggregations that are run as part of the search request.
type: object
additionalProperties:
$ref: '../schemas/_common.aggregations.yaml#/components/schemas/AggregationContainer'
collapse:
$ref: '../schemas/_core.search.yaml#/components/schemas/FieldCollapse'
explain:
Expand Down
2 changes: 1 addition & 1 deletion tests/default/_core/search/aggregations/avg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ chapters:
request:
payload:
size: 0
aggregations:
aggs:
duration_avg:
avg:
field: duration
Expand Down
2 changes: 1 addition & 1 deletion tests/default/_core/search/aggregations/historgram.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ chapters:
request:
payload:
size: 0
aggregations:
aggs:
movies:
histogram:
field: year
Expand Down
2 changes: 1 addition & 1 deletion tests/default/_core/search/aggregations/max.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ chapters:
request:
payload:
size: 0
aggregations:
aggs:
duration_max:
max:
field: duration
Expand Down
2 changes: 1 addition & 1 deletion tests/default/_core/search/aggregations/min.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ chapters:
request:
payload:
size: 0
aggregations:
aggs:
duration_min:
min:
field: duration
Expand Down

0 comments on commit 896052e

Please sign in to comment.