Backport elasticsearch-1.3.0 update from trunk.