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

unknown field [must_exist] for post _aliases remove action #2949

Closed
payalm08 opened this issue Apr 18, 2022 · 6 comments
Closed

unknown field [must_exist] for post _aliases remove action #2949

payalm08 opened this issue Apr 18, 2022 · 6 comments
Labels
bug Something isn't working Indexing & Search v2.12.0 Issues and PRs related to version 2.12.0 v3.0.0 Issues and PRs related to version 3.0.0

Comments

@payalm08
Copy link

payalm08 commented Apr 18, 2022

Describe the bug
When executing api post _alias with remove action with ""must_exist": true" in request, getting error unknown field [must_exist]

To Reproduce
Steps to reproduce the behavior:

POST _aliases 
{
   "actions": [
    {
      "remove": {
        "index": "testIndex",
        "aliases": "testAlias",
        "must_exist": true
      }
    }
  ]
}

Error

{
  "error" : {
    "root_cause" : [
      {
        "type" : "x_content_parse_exception",
        "reason" : "[7:9] [remove] unknown field [must_exist]"
      }
    ],
    "type" : "x_content_parse_exception",
    "reason" : "[7:23] [aliases] failed to parse field [actions]",
    "caused_by" : {
      "type" : "x_content_parse_exception",
      "reason" : "[7:23] [alias_action] failed to parse field [remove]",
      "caused_by" : {
        "type" : "x_content_parse_exception",
        "reason" : "[7:9] [remove] unknown field [must_exist]"
      }
    }
  },
  "status" : 400
}

Expected behavior
Expected response

{
  "acknowledged" : true
}

Host/Environment (please complete the following information):

  • Version - OS 1.2

Reported elastic/elasticsearch#62642

@payalm08 payalm08 added bug Something isn't working untriaged labels Apr 18, 2022
@dblock
Copy link
Member

dblock commented Apr 19, 2022

Looks like this isn't implemented. Would gladly accept a PR implemented from scratch in OpenSearch.

@gaobinlong
Copy link
Collaborator

The parameter must_exist exists in the code but the functionality is not complete yet, I'm trying to fix this issue.

@gaobinlong
Copy link
Collaborator

I've created a PR for this issue, could anyone help to review?

@reta reta added v3.0.0 Issues and PRs related to version 3.0.0 v2.12.0 Issues and PRs related to version 2.12.0 labels Jan 9, 2024
@kiranprakash154
Copy link
Contributor

Hi, are we on track for this to be released in 2.12 ?

@gaobinlong
Copy link
Collaborator

Hi, are we on track for this to be released in 2.12 ?

Yes, the bug fix will be released in 2.12.0.

@gaobinlong
Copy link
Collaborator

Closed by #11210.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Indexing & Search v2.12.0 Issues and PRs related to version 2.12.0 v3.0.0 Issues and PRs related to version 3.0.0
Projects
None yet
Development

No branches or pull requests

6 participants