Updated elasticsearch.go and elasticsearch_test.go.