What does "OpenSearch.indices.create" refer to?

Under API Reference / helpers / index , it refers to OpenSearch.indices, ie:

Any additional keyword arguments will be passed to OpenSearch.indices.create unchanged.

It’s not clear what “OpenSearch.indices” means. The obvious interpretation doesn’t work:

>>> from opensearchpy import OpenSearch
>>> OpenSearch.indices
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: type object 'OpenSearch' has no attribute 'indices'

Is this supposed to be opensearchpy.client.indices.IndicesClient?

See the example in this document helps, create a client firstly:

client = OpenSearch(...)

, and the use client.indices.create() and other functions to do some index level operations. indices means something like indexClient.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.