Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/80.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
View 查找一个未在Couchdb中运行的查询_View_Couchdb_Postman - Fatal编程技术网

View 查找一个未在Couchdb中运行的查询

View 查找一个未在Couchdb中运行的查询,view,couchdb,postman,View,Couchdb,Postman,似乎是正确的,但没有运行 以下是我在数据库测试中存储的文档 http://127.0.0.1:5984/test/_design/test1/_view/test1/by_date?key="2009/01/30 18:04:11" 我想查找单个文档(带有自行车id的文档)…如果视图的名称确实是test1/by\u date,那么/可能就是问题所在。您可以尝试将其URL编码为%2F,以便查询变成: { "_id":"biking", "_rev":"AE19EBC7654",

似乎是正确的,但没有运行

以下是我在数据库测试中存储的文档

http://127.0.0.1:5984/test/_design/test1/_view/test1/by_date?key="2009/01/30 18:04:11"  

我想查找单个文档(带有自行车id的文档)…

如果视图的名称确实是
test1/by\u date
,那么
/
可能就是问题所在。您可以尝试将其URL编码为
%2F
,以便查询变成:

 {
  "_id":"biking",
  "_rev":"AE19EBC7654",
  "title":"Biking",
  "body":"My biggest hobby is mountainbiking. The other day...",
  "date":"2009/01/30 18:04:11"
 }

{
 "_id":"bought-a-cat",
 "_rev":"4A3BBEE711",
 "title":"Bought a Cat",
 "body":"I went to the the pet store earlier and brought home a little kitty...",
 "date":"2009/02/17 21:13:39"
}
{
"_id":"hello-world",
"_rev":"43FBA4E7AB",
"title":"Hello World",
"body":"Well hello and welcome to my new blog...",
"date":"2009/01/15 15:52:20"
}

但我宁愿去掉名字上的斜杠。这是自找麻烦。

你能发布你的映射函数吗?这里是函数(doc){if(doc.date&&doc.title)emit(doc.date,doc.title);}我刚刚测试过它,它在CouchDB 1.6.0中使用
%2F
。看一下日志,它可能会告诉你更多关于错误的信息。
http://127.0.0.1:5984/test/_design/test1/_view/test1%2Fby_date?key="2009/01/30 18:04:11"