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

**URL:** <https://forum.opensearch.org/t/what-does-opensearch-indices-create-refer-to/17666>\
**Category:** OpenSearch Client Libraries\
**Tags:** opensearch-py\
**Created:** [January 31, 2024, 5:49pm UTC](https://forum.opensearch.org/t/what-does-opensearch-indices-create-refer-to/17666 "2024-01-31T17:49:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![roy649](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/roy649/32/6673_2.png) [@roy649](https://forum.opensearch.org/u/roy649)\
**Post date:** [January 31, 2024, 5:49pm UTC](https://forum.opensearch.org/t/what-does-opensearch-indices-create-refer-to/17666/1 "2024-01-31T17:49:24Z")

</div>

Under [API Reference / helpers / index](https://opensearch-project.github.io/opensearch-py/api-ref/helpers/index.html) , 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:

```auto
>>> 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](https://opensearch-project.github.io/opensearch-py/api-ref/clients/indices_client.html#opensearchpy.client.indices.IndicesClient)?

---

<div class="post-metadata">

**Author:** ![gaobinlong](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/gaobinlong/32/5242_2.png) [@gaobinlong](https://forum.opensearch.org/u/gaobinlong)\
**Post date:** [February 1, 2024, 2:02pm UTC](https://forum.opensearch.org/t/what-does-opensearch-indices-create-refer-to/17666/2 "2024-02-01T14:02:09Z")

</div>

See the example in this [document](https://opensearch.org/docs/latest/clients/python-high-level/) helps, create a client firstly:

```auto
client = OpenSearch(...)

```

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/3/33547ea01a5b12dcca2958411d3edd97ae2ea8c1.png) [@system](https://forum.opensearch.org/u/system)\
**Post date:** [April 1, 2024, 2:03pm UTC](https://forum.opensearch.org/t/what-does-opensearch-indices-create-refer-to/17666/3 "2024-04-01T14:03:09Z")

</div>

Closed on April 1, 2024, 2:03pm UTC

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