Elasticsearch responses no longer return 'OK'. Updated code to check
for actual HTTP status codes to determine success/failure status.