sjishan
sjishan

Reputation: 3672

Cannot find optimize function for indices in elasticsearch python client

I am using elasticsearch python client 6.4.0 I want to use the optimize API https://www.elastic.co/guide/en/elasticsearch/reference/1.7/indices-optimize.html

But I could not find anything about it in the elasticsearch python api doc https://elasticsearch-py.readthedocs.io/en/master/api.html

I tried using es.indices.optimize(...) but that function does not exist.

I will prefer to use the python client instead of direct API call.

Upvotes: 0

Views: 226

Answers (1)

zbusia
zbusia

Reputation: 601

You are looking at a very old version of elastic (1.7). Optimize API was renamed to forcemerge and under this name it is available in python client (docs)

Upvotes: 1

Related Questions