CouchDB、Elastic Search 和 River Plugin 无法正常运行
我正在尝试让 ElasticSearch 工作,特别是与 River 插件一起工作。由于某种原因我无法让它工作。我已经包含了我用来尝试执行此操作的过程,发现 此处:
curl -XDELETE 'http://localhost:9200/_all/'
响应:
{
"ok": true,
"acknowledged": true
}
这样我就知道我正在使用一组空的elasticsearch 实例。
我有一个名为 test 的现有数据库,并且已经安装了 River 插件。是否有办法测试以确认 River 插件已安装并运行?
我发出以下命令:
curl -XPUT 'http://localhost:9200/_river/my_index/_meta' -d '{
"type" : "couchdb",
"couchdb" : {
"host" : "localhost",
"port" : 5984,
"db" : "my_couch_db",
"filter" : null
}
}'
my_couch_db 是一个真实的数据库,我在 Futon 中看到它。里面有一个文档。
回应:
{
"ok": true,
"_index": "_river",
"_type": "my_index",
"_id": "_meta",
"_version": 1
}
现在,我的理解是elasticseach 应该像我在教程中看到的那样工作。
我尝试查询,只是为了找到任何东西。我去
http://localhost:9200/my_couch_db/my_couch_db.
响应:
No handler found for uri [/my_couch_db/my_couch_db] and method [GET]
奇怪的是当我去
localhost:5984/my_couch_db/__changes
我得到
{
"error": "not_found",
"reason": "missing"
}
任何人都知道我搞砸了哪一部分?
I'm trying to get ElasticSearch to work, specifically with the River Plugin. For some reason I just can't get it to work. I've included the procedure I'm using to try and do it, found here:
curl -XDELETE 'http://localhost:9200/_all/'
Response:
{
"ok": true,
"acknowledged": true
}
This is so I know I'm working with an empty set of elasticsearch instances.
I have an existing database, called test and the river plugin has already been installed. Is there anyway to test to confirm the River Plugin is installed and running?
I issue the following command:
curl -XPUT 'http://localhost:9200/_river/my_index/_meta' -d '{
"type" : "couchdb",
"couchdb" : {
"host" : "localhost",
"port" : 5984,
"db" : "my_couch_db",
"filter" : null
}
}'
my_couch_db is a real database, I see it in Futon. There is a document in it.
Response:
{
"ok": true,
"_index": "_river",
"_type": "my_index",
"_id": "_meta",
"_version": 1
}
Now at this point, my understanding is elasticseach should be working as I saw in the tutorial.
I try to query, just to find anything. I go to
http://localhost:9200/my_couch_db/my_couch_db.
Response:
No handler found for uri [/my_couch_db/my_couch_db] and method [GET]
What's weird is when I go to
localhost:5984/my_couch_db/__changes
I get
{
"error": "not_found",
"reason": "missing"
}
Anyone have any idea what part of this I'm screwing up?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试添加
/_search
(带有可选的?pretty=true
)你的curl -XGET 的末尾如下所示:尝试从
__changes
中删除一个下划线并应该像这样工作:try adding
/_search
(w/ optional?pretty=true
) at the end of your curl -XGET like so:try removing one of the underscores from your
__changes
and that should work like so: