json - Postman中Elasticsearch的不正确curl语法

标签 json elasticsearch curl postman

我是一个新手,并在此处遵循AWS示例:https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-gsg-upload-data.html构建我的第一个Elasticsearch应用程序。
我正在使用Postman进行curl命令POST,以追加新文档和索引,如下所示。但是,似乎该语法在Postman中高亮显示不正确,因此请查看是否支持更正,谢谢!
curl code for Post in postman

updated

enter image description here

最佳答案

如果要发布到_bulk URL,则第1到6行应该在一行上,没有换行符。第7行和第8行相同。您需要在末尾添加一个换行符。像这样:

{ "index": {"_index": "movies", "_type": "movie", "_id": "2" }}
{ "director": "...", ...}     + add a new line at the end of this line

关于json - Postman中Elasticsearch的不正确curl语法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51605109/

相关文章:

PHP 使用 CURL : is there a way to emulate a cookie instead of saving it to a file?

json - 使用 swiftyJson 解析 JSON

javascript - 如何遍历 DataTable 中的特定列?

elasticsearch - 映射的DynamoDb数据上的Elasticsearch嵌套查询不返回任何内容

mongodb - 使用 MongoDB 部署 Elastic Beanstalk

cURL 获取响应

bash - 如何使用 curl 创建 Github Pull Request?

java - 在获取值之前如何对 JSONObject 中的每个元素进行 null 检查?

asp.net - 将参数传递给 jqueryui 对话框

ElasticSearch:如何从头部删除索引条目?