弹性搜索河mongodb _meta返回动作未找到错误

时间:2014-12-16 13:15:02

标签: elasticsearch elasticsearch-mongo-river

我成功设置了弹性搜索mongodb。我使用的是弹性搜索版本1.3.5和River版本2.0.2。

当我试图获得河流的状态时

curl -XGET "localhost:9200/_river/mongodb/_meta"

我收到以下错误

{"success":false,"error":"action not found: /_river/mongodb/_meta"}

我的河牌是" mongodb"

我也尝试了_status请求

curl -XGET "http://localhost:9200/_river/mongodb/_status"
{"success":false,"error":"action not found: /_river/mongodb/_status"}

2 个答案:

答案 0 :(得分:0)

请求应使用“_status”而不是“_meta”:

 curl -XGET "localhost:9200/_river/mongodb/_status"

请参阅River documentation

答案 1 :(得分:0)

我得到了答案,实际上问题是由于河牌名称 mongodb 。我将名称更改为 test_river 。之后_status_meta_riverstatus请求有效。

当我使用河牌 mongodb 时,我能够得到所有其他请求的正确回复,例如搜索,河牌创建的索引的状态等。

curl -XGET "localhost:9200/_river/test_river/_status"

结果:

{
  "_index": "_river",
  "_type": "test_river",
  "_id": "_status",
  "_version": 1,
  "found": true,
  "_source": {
    "node": "",
    "id": "pw3UUP7KQcuVSocDLlFdQw",
    "name": "Starshine",
    "transport_address": "inet[/10.3.0.53:9300]"
  }
}

curl -XGET "localhost:9200/_river/test_river/_meta"

结果:

{
  "_index": "_river",
  "_type": "test_river",
  "_id": "_meta",
  "_version": 1,
  "found": true,
  "_source": {
    "type": "mongodb",
    "mongodb": {
      "db": "test",
      "collection": "employees"
    },
    "index": {
      "name": "el_test",
      "type": "employees"
    }
  }
}

curl -XGET "localhost:9200/_river/test_river/_riverstatus

结果:

{
  "_index": "_river",
  "_type": "test_river",
  "_id": "_riverstatus",
  "_version": 3,
  "found": true,
  "_source": {
    "mongodb": {
      "status": "RUNNING"
    }
  }
}