Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add is_hidden parameter for create or update alias API #429

Merged
merged 3 commits into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added missing fields to `/_nodes/stats` ([#415](https://github.com/opensearch-project/opensearch-api-specification/pull/415))
- Added missing metrics options to `/_nodes/stats` ([#422](https://github.com/opensearch-project/opensearch-api-specification/pull/422))
- Added tests against OpenSearch 1.3 ([#424](https://github.com/opensearch-project/opensearch-api-specification/pull/424))
- Added `is_hidden` to `/{index}/_alias/{name}` and `/{index}/_aliases/{name}` ([#429](https://github.com/opensearch-project/opensearch-api-specification/pull/429))

### Changed

Expand Down
6 changes: 6 additions & 0 deletions spec/namespaces/indices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1860,6 +1860,12 @@ components:
$ref: '../schemas/_common.yaml#/components/schemas/Routing'
search_routing:
$ref: '../schemas/_common.yaml#/components/schemas/Routing'
is_hidden:
x-version-added: '2.16'
description: |-
If `true`, the alias will be hidden`.
type: boolean
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add default: false, and no need to say "defaults to ..." in the text. We're going to clean these up at some point.

default: false
description: The settings for the alias, such as `routing` or `filter`
indices.put_index_template:
content:
Expand Down
30 changes: 30 additions & 0 deletions tests/indices/aliases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,33 @@ chapters:
parameters:
index: games
name: plays2
- synopsis: Create an alias by Create or Update alias endpoint.
path: /{index}/_alias/{name}
method: PUT
parameters:
index: games
name: jeux
- synopsis: Create an alias with custom settings by Create or Update alias endpoint.
path: /{index}/_alias/{name}
method: PUT
parameters:
index: games
name: jeux
request_body:
payload:
index_routing: test1
search_routing: test2
routing: test
is_write_index: true
filter:
match_all: {}
- synopsis: Create an alias with is_hidden by Create or Update alias endpoint.
version: '>= 2.16'
path: /{index}/_alias/{name}
method: PUT
parameters:
index: games
name: jeux
request_body:
payload:
is_hidden: true
Loading