Skip to content

[DOC] Low-level Python client documentation for creating index is incorrect #10666

@peteralfonsi

Description

@peteralfonsi

What do you want to do?

  • Request a change to existing documentation
  • Add new documentation
  • Report a technical problem with the documentation
  • Other

Tell us about your request.

In the low-level Python client documentation it says you can create an index with client.indices.create(index_name, body=index_body). This worked for me on opensearch-py version 2.8.0. However I installed the newest version 3.0.0 and it no longer works:

File "/home/ec2-user/create_fd_indices.py", line 48, in create_index
    return client.indices.create(name, body=body)
  File "/home/ec2-user/.local/lib/python3.9/site-packages/opensearchpy/client/utils.py", line 176, in _wrapped
    return func(*args, params=params, headers=headers, **kwargs)
TypeError: create() takes 1 positional argument but 2 positional arguments (and 3 keyword-only arguments) were given

It seems like the signature of create() has changed between 2.8.0 and 3.0. This should be reflected in the documentation.

Version:

Somewhere between opensearch-py 2.8.0 and 3.0, and all versions after that

Metadata

Metadata

Assignees

No one assigned

    Labels

    BacklogIssue: The issue is unassigned.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions