【问题标题】:Removing documents with filter replication does not work使用过滤器复制删除文档不起作用
【发布时间】:2017-07-17 16:33:04
【问题描述】:

我正在尝试使用过滤器创建复制以删除 CouchDB 上已删除的文档,但我总是面临同样的错误。

这是我的filter

 "deletedfilter": "function(doc, req) { return !doc._deleted; };",

这是我的_replicator

{
   "_id": "replicateCleanup",
   "source": "http://myuser:mypass@l@localhost/a",
   "target": "http://myuser:mypass@localhost/b,
   "create_target": true,
   "filter": "filters/deletedfilter",
   "owner": "myuser",
   "continuous": false
}

我面临的错误:

       "_replication_state": "error",
               "_replication_state_time": "2017-07-17T18:07:49+02:00",
               "_replication_state_reason": "Could not open source database 
        `http://myuser:*****@localhost/a/`:
     {'EXIT',\n    {http_request_failed,\"HEAD\",\n        \"http://myuser:*****@localhost/a/\",\n     
   {error,{error,{conn_failed,{error,econnrefused}}}}}}"
            }

知道我做错了什么

【问题讨论】:

    标签: couchdb database-replication couchdb-futon


    【解决方案1】:

    我忘记了网址上的端口,所以只需更改此行

      "source": "http://myuser:mypass@l@localhost/a",
       "target": "http://myuser:mypass@localhost/b,
    

    为了这个

     "source": "http://myuser:mypass@l@localhost:5984/a",
     "target": "http://myuser:mypass@localhost:5984/b,
    

    【讨论】:

      猜你喜欢
      • 2013-07-14
      • 2018-10-27
      • 2011-11-23
      • 2023-03-29
      • 2020-06-24
      • 1970-01-01
      • 2014-10-14
      • 2011-11-25
      • 2015-02-05
      相关资源
      最近更新 更多