Java API - IndexRequest with refresh

Hello.

Does *ElasticSearch *ensure that after one makes an index request and sets refresh to true, the refresh is being completed by the time we get the response back or the refresh is done asynchronously and it is not guaranteed that refresh is completed by the time the response is sent back?

Sample code:
val request = new IndexRequest(indexName, typeName)
.refresh(true)
.id(someId)
.source(someJson.toString)

Thanks!

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

The "refresh" attribute in the index request controls the optional
execution of a (heavy) refresh operation after the document creation.
This is synchronous per shard but asynchronous per replica.

If you want to receive the API response after all replica shards have
completed the operation you must increase the write consistency to
WriteConsistencyLevel.ALL. This will wait for operation completion for
all nodes being involved until the timeout in the request given is exceeded.

Jörg

Am 24.05.13 17:12, schrieb Andrei Tolnai:

Hello.
Does *ElasticSearch *ensure that after one makes an index request and
sets refresh to true, the refresh is being completed by the time
we get the response back or the refresh is done asynchronously and it
is not guaranteedthat refresh is completed by the time the response is
sent back?
Sample code:
valrequest=newIndexRequest(indexName,typeName)
.refresh(true)
.id(someId)
.source(someJson.toString)

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.