【发布时间】:2014-11-18 00:45:23
【问题描述】:
我像这样创建了以下地图
curl -XPUT http://localhost:9200/movies -d '
{
"mappings" : {
"_default_" : {
"properties" : {
"title" : {"type": "string", "index" : "not_analyzed" },
"director" : {"type": "string", "index" : "not_analyzed" },
"year" : { "type" : "integer" }
}
}
}
}
';
我有一个名为 others2.json 的文件
{"index":{"_index":"movies","_type":"movie","_id":1}}
{"title": "Movie1","director": "director1","year": 1962}
最后多了一行。
当我尝试使用 curl -XPUT localhost:9200/_bulk --data-binary @other2.json 行添加 other2.json 的内容时,我收到以下错误消息
{"error":"ActionRequestValidationException[Validation Failed: 1: no requests added;]","status":500}
我做错了什么?
【问题讨论】:
标签: json elasticsearch