I'm uploading documents using syntax like the following.

curl -XPOST 'http://localhost:9200/test/type1/_bulk' -d '
{ "index" : { "_id" : "i1", "version": 3, "version_type": "external", 
"replication": "async", "timeout": "5m" } }
{ "fields": "values etc." }
{ "index" : { "_id" : "i2", "version": 1, "version_type": "external", 
"replication": "async", "timeout": "5m" } }
{ "fields": "values etc." }
'

A couple of questions:  First, there's a fair bit of redundancy in the 
action line.  It feels wasteful when sending 10s of Mb /  thousands of 
requests per API call.
Can I roll default version_type / replication / timeout parameters into the 
top-level _bulk url?  I've seen a few resolved issues suggesting this.  But 
it's not mentioned in the documentation at 
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-bulk.html


Second, in the response I occasionally see errors like
{"index":"test","_type":"type1","_id":"123","status":503,"error":"UnavailableShardsException[[test][98]
 
[3] shardIt, [3] active : Timeout waiting for [0s], request: 
org.elasticsearch.action.bulk.BulkShardRequest@36d185a1]"}

The "[0s]" part is surprising.  The available-shard-timeout is 1m by 
default, and I explicitly requested 5m.  Does this get overridden somewhere?

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/ba4bde17-2668-42c4-9d14-0923571044d5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to