在Windows上安装用于ElasticSearch的CouchDB River插件



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

首次发行

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

按照这里的指示:https://github.com/elasticsearch/elasticsearch-river-couchdb我打开Windows7命令提示符并执行以下命令:

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>                                                                         

我用这篇博客文章弄明白了

使用ElasticSearch 进行全文搜索CouchDB

第1期

我没有指向elasticsearch目录中正确的"插件"文件。

在导航到本地elasticsearch目录中的"/bin"并运行此命令后,我使其正常工作:

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

第2期

我认为我的cURL语法不正确,不知道它到底是什么,但最终使用了Firefox的HttpRequester插件。我相信是双引号造成了问题。

最新更新