TypeError: 'IndicesClient' object is not callable

TypeError: 'IndicesClient' object is not callable

es_res = es.indices(index=index, bytes='b',format='json')

调用索引时出现以下错误api

类型错误:'IndicesClient'对象不可调用

Documentation

谢谢。

要获取有关索引的信息,

In [127]: from elasticsearch import Elasticsearch

In [128]: params = {"bytes":"b","format":"json"}

In [129]: es = Elasticsearch()

In [130]: es.cat.indices("blogs", params=params)
Out[130]:
[{'health': 'yellow',
  'status': 'open',
  'index': 'blogs',
  'uuid': 'vqkQn3UxS1qGaM3OfLEUSg',
  'pri': '3',
  'rep': '1',
  'docs.count': '0',
  'docs.deleted': '0',
  'store.size': '849',
  'pri.store.size': '849'}]