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

Document "require_alias" in _bulk API #66255

Closed
jakelandis opened this issue Dec 14, 2020 · 1 comment · Fixed by #66259
Closed

Document "require_alias" in _bulk API #66255

jakelandis opened this issue Dec 14, 2020 · 1 comment · Fixed by #66259
Assignees
Labels
>docs General docs changes Team:Docs Meta label for docs team

Comments

@jakelandis
Copy link
Contributor

#58917 introduced require_alias for index operations. Included in this the _bulk API both by line item and by query parameter. However, it looks like the documentation was missed.

For example:


POST _bulk
{ "create" : { "_index" : "test_alias", "require_alias" : true } }
{ "@timestamp" : "1" }

and

POST _bulk?require_alias=true
{ "create" : { "_index" : "test_alias" } }
{ "@timestamp" : "1" }

Will correctly fail with

{
  "took" : 0,
  "errors" : true,
  "items" : [
    {
      "create" : {
        "_index" : "test_alias",
        "_type" : "_doc",
        "_id" : null,
        "status" : 404,
        "error" : {
          "type" : "index_not_found_exception",
          "reason" : "no such index [test_alias] and [require_alias] request flag is [true] and [test_alias] is not an alias",
          "index_uuid" : "_na_",
          "index" : "test_alias"
        }
      }
    }
  ]
}

since there is not an alias named "test_alias". We should document this new flag.

@jakelandis jakelandis added the >docs General docs changes label Dec 14, 2020
@elasticmachine elasticmachine added the Team:Docs Meta label for docs team label Dec 14, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs (Team:Docs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>docs General docs changes Team:Docs Meta label for docs team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants