在Windows上为ElasticSearch安装CouchDB River插件

时间:2013-11-21 18:37:23

标签: curl install elasticsearch couchdb

我已经安装了couchdb和弹性搜索,并使它们都启动并运行。

第一期

我现在正在尝试为elasticsearch安装couchdb河流插件。

按照此处的说明:https://github.com/elasticsearch/elasticsearch-river-couchdb我打开Windows 7命令提示符并执行此操作:

bin/plugin -install elasticsearch/elasticsearch-river-couchdb/1.2.0

我明白了:

'bin' is not recognized as an internal or external command, operable program or batch file.

我知道这一定很简单......

第二期

我也尝试运行curl命令来设置新索引,我得到了这个错误(我相信无论插件还没有安装,都会发生这种情况):

我删除了单引号,因为Windows不喜欢它们......

curl -XPUT localhost:9200/_river/my_db/_meta -d {
    "type" : "couchdb",
    "couchdb" : {
        "host" : "localhost",
        "port" : 5984,
        "db" : "my_db",
        "filter" : null
    },
    "index" : {
        "index" : "my_db",
        "type" : "my_db",
        "bulk_size" : "100",
        "bulk_timeout" : "10ms"
    }
}

我明白了:

{"error":"MapperParsingException[failed to parse]; nested: JsonParseException[Un
expected end-of-input: expected close marker for OBJECT (from [Source: [B@38ec57
4c; line: 1, column: 0])\n at [Source: [B@38ec574c; line: 1, column: 3]]; ","sta
tus":400}curl: (6) Could not resolve host: type                                 
<?xml version="1.0" encoding="UTF-8"?>                                          
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"                        
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">                          
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">             
<head>                                                                          
<title>Method not allowed!</title>                                              
<link rev="made" href="mailto:postmaster@localhost" />                          
<style type="text/css"><!--/*--><![CDATA[/*><!--*/                              
    body { color: #000000; background-color: #FFFFFF; }                         
    a:link { color: #0000CC; }                                                  
    p, address {margin-left: 3em;}                                              
    span {font-size: smaller;}                                                  
/*]]>*/--></style>                                                              
</head>                                                                         

<body>                                                                          
<h1>Method not allowed!</h1>                                                    
<p>                                                                             


    The PUT                                                                     
    method is not allowed for the requested URL.                                

</p>                                                                            
<p>                                                                             
If you think this is a server error, please contact                             
the <a href="mailto:postmaster@localhost">webmaster</a>.                        

</p>                                                                            

<h2>Error 405</h2>                                                              
<address>                                                                       
  <a href="/"></a><br />                                                        
  <span>Apache/2.4.4 (Win32) OpenSSL/1.0.1e PHP/5.5.1</span>                    
</address>                                                                      
</body>                                                                         
</html>                                                                         

1 个答案:

答案 0 :(得分:0)

我用这篇博文

想出来了

Fulltext searching CouchDB with ElasticSearch

问题#1

我没有指向elasticsearch目录中正确的'plugin'文件。

导航到我的本地elasticsearch目录中的'/ bin'并运行此命令后,我得到了它的工作:

plugin -install elasticsearch/elasticsearch-river-couchdb/1.2.0

问题#2

我相信我的cURL语法不正确,并且没有弄清楚它究竟是什么,但最终使用了HttpRequester plugin for Firefox。我相信它的双引号引起了问题。