内联运行时错误_bulk(即请求)

时间:2015-07-24 10:28:36

标签: elasticsearch

我正在学习这个伟大的工具ElasticSearch。

一切都井然有序:

1)执行查询:

$ curl -XGET 'localhost:9200/website/blog/1?pretty'

我明白了:

{
"_index" : "website",
"_type" : "blog",
"_id" : "1",
"_version" : 15,
"found" : true,
"_source":{"title":"My first blog entry","text":"foo","tags":["testing 1"],"views":43}
}

2)执行_bulk:

curl -XPOST localhost:9200/_bulk --data-binary '
{"delete": { "_index": "website", "_type": "blog", "_id": "1" }}\n
{ "create": { "_index": "website", "_type": "blog", "_id": "1" }}\n
{ "title": "My first blog entry" }\n'

我明白了:

{"error":"ActionRequestValidationException[Validation Failed: 1: no requests added;]",
 "status":400}

为什么?

提前致谢)。

0 个答案:

没有答案