Closed prabhupant closed 5 months ago
@prabhupant Do you have a moment to contribute this?
I see it in https://github.com/opensearch-project/opensearch-api-specification/blob/eb271e654015250b924b6e3c2f1ad0865333a19d/spec/namespaces/indices.yaml#L1275, so I imagine our generator doesn't handle these parameters? cc: @saimedhi
@dblock, @prabhupant, the opensearch-py client includes a wait_for_completion parameter in the forcemerge API. You can view it here. Let me know if I missed anything. Thanks!
@prabhupant Maybe you're using an old version of the client? Can we close this?
@saimedhi @dblock Thanks for pointing it out! I had an older version of the client and it wasn't available there.
Also, just one more question. I see in the OpenSearch API docs that forcemerge doesn't have wait_for_completion
in query param https://opensearch.org/docs/latest/api-reference/index-apis/force-merge/#query-parameters. Using this in the request does not return a task ID like it does for reindex
. Let me know if my query is wrong
Also, just one more question. I see in the OpenSearch API docs that forcemerge doesn't have
wait_for_completion
in query param https://opensearch.org/docs/latest/api-reference/index-apis/force-merge/#query-parameters. Using this in the request does not return a task ID like it does forreindex
. Let me know if my query is wrong
I am not too familiar with this feature, I would do a couple of things:
Let me know if this proposal makes sense
Is your feature request related to a problem?
forcemerge
operation is quite heavy and esp if there is a large index, this operation is bound to take time. Currently, likereindex
API this does not support passingwait_for_completion
parameter, so there is no way to know whether the job succeeded. As we are developing scripts to maintain the index, tracking the job using the task ID will help us keep track of the job.What solution would you like?
Add wait_for_completion query parameter which will return the task ID
What alternatives have you considered?
Currently the only alternative, I think, is to query the index stats after force refresh and compare the stats