Migrate createIndex().
Remove a comma in doc to make example a valid json.

This will help reader to do a hurry up copy-paste test.
Merge pull request #3767 from gtt116/master

Remove a comma in doc to make example a valid json.
Update Operation might hang (rarely) when retrying on invalid shard state
The retry logic when failing does not reset the operation started flag...
closes #3769
improve search while relocation
- add verification phase at the end of the test
- add explicit test for 0 replicas and 1 replica
Moved RecoverAfterNodesTests to inherit from AbstractIntegrationTest
Introduce internal post recovery state
Introduce a new internal, index shard level, post recovery state, where the shard moves to when its done with recovery. The shard will now move to started only once the cluster state with its respective cluster state level state is started.

This change allow to have more fine grained control over when to allow reads on a shard, resolving potential refresh temporal visibility aspects while indexing and issuign a refresh. By only allowing reads on started shards, and making sure we refresh right before we move to started
add origin to failure message
Acquire ReadLock before reading SegmentInfos in RobinEngine

Before reading segmentinfos we should aquire the read lock to prevent
reading the segment infos on an already closed robin engine.