Is refresh interval call is sync or async call in elasticsearch

hello sir,
I'm new to elastic search I needed to know how the refresh interval works internally.
lets say resfresh interval is 1 second so after 10 seconds how many refresh call will happen if each refresh completes 5 seconds to update file system
from memory buffer.

will it take 2 refresh call or 10 refresh call.

It's sync, so it'll only run one if there isn't one running.

But if it takes 5 seconds to do something on the filesystem you have bigger problems.

1 Like

When I am using monitoring plugin, I am seeing a graph with index refresh times. I see that graph values are fluctuating and it is not same as the configured refresh interval. Are they same?

Please start your own thread :slight_smile:

thank you sir

Hello Sir,
As you told refresh is sync if the refresh is called continuously from coding using updatewith refresh and each refresh takes 100ms to refresh the particular shard what will happen to the refresh called using refresh interval will it trigger or wait for the refresh to complete.

if refresh of refresh interval waits how the shards other shard will refresh

Why would you do that? Why not use wait_for - https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-refresh.html

Hi Sir,
Im trying to update 100 document without refresh and seperately one document with refresh = wait_for its refreshing immediately all 100 document how.
I have Only one shard created for testing

This is expected.

Calling refresh with wait_for will wait for the next refresh cycle.

If you indexed 100 documents then 1 more doc, the last operation will wait for the "101 documents to be refreshed".

1 Like

Sorry for Disturbing

But if we do that it is same as calling refresh right
Can i refresh only particular document instead of whole shard

But if we do that it is same as calling refresh right

No. It's waiting for the next refresh. It's not calling refresh.

Can i refresh only particular document instead of whole shard

No.

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