'Refresh' setting for a bulk update request

Hello all,

This is my first post here and thank you for this amazing tool.

I am using the Elasticsearch-rest-client and I wanted a clarification with the behaviour of Refresh setting with the Bulk API.

Does the 'refresh=true' parameter ensure that any reads done immediately after the write request(performed using performRequest) has returned will indeed return the new data?

The refresh happens synchronously.

What I prefer doing though is to call explicitly the refresh API after the execution of the index operations.

Thanks for your reply. May I ask, which use-cases the explicit call to refresh are meant to handle if refresh=true does indeed happen synchronously before the write request is returned?

Apologies, I edited my question now to use better wording.

Just for the clarity of my code. And I'm only doing that in integration tests. Never in production.

@dadoonet May I request that you please take a look at my edited question? It will be really helpful if you can help answer it.

Yes it will.

1 Like

Thank you!

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