-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Labels
IndexingIndexing, Bulk Indexing and anything related to indexingIndexing, Bulk Indexing and anything related to indexingbugSomething isn't workingSomething isn't workingv2.16.0Issues and PRs related to version 2.16.0Issues and PRs related to version 2.16.0v3.0.0Issues and PRs related to version 3.0.0Issues and PRs related to version 3.0.0
Description
Describe the bug
There is a bug in the PUT _alias/{alias} API that does not validate the fields inside the payload when adding/removing backing indices. While this results in a no-op, ideally an exception should be thrown and an incorrect payload should not be rejected.
Related component
Indexing
To Reproduce
- Create a new index
- Create an alias with this index as a backing index and supply an incorrect field inside the
addblock - The service won't throw an error
Example:
PUT index-1
PUT _alias/alias-1
{
"actions": [
{
"add": {
"index": "index-1",
"alias": "alias-1",
"abcd": true
}
}
]
}
The response (unexpected) is the following:
{
"acknowledged": true
}
Expected behavior
The service should throw an error in the above mentioned scenario as abcd is not a recognized field.
Additional Details
Plugins
NA
Screenshots
NA
Host/Environment (please complete the following information):
NA
Additional context
Sample attached above
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
IndexingIndexing, Bulk Indexing and anything related to indexingIndexing, Bulk Indexing and anything related to indexingbugSomething isn't workingSomething isn't workingv2.16.0Issues and PRs related to version 2.16.0Issues and PRs related to version 2.16.0v3.0.0Issues and PRs related to version 3.0.0Issues and PRs related to version 3.0.0