CouchDB Find One not working

I am new to couchDB and am doing examples in the O'Reilly CouchDB tutorial.

I had a problem using the view to get the document by key:

curl http://127.0.0.1:5984/basic/_design/example/_view/by_date?key="2009/01/15 15:52:20"

gives the answer:

curl: (52) Empty reply from server

but just extract all the lines:

curl http://127.0.0.1:5984/basic/_design/example/_view/by_date

gives me 3 lines, including the specific line I'm looking for:

{"id": "hello-world", "key": "2009/01/15 15:52:20", "value": "Hello World"}

Why does the key request not work?

I am using CouchDB version 0.10.0 on Ubuntu 9.10

+5
source share
2 answers

CouchDB , start_key JSON- , "a string" 12345 ["an", "array", "with", 5.0, "elements"]. CouchDB, , , 400 ( ), UTF8, JSON.

, , :

  • , CouchDB. .

  • , , URL. , %20

, CouchDB 0.11 Ubuntu 9.10.

$ curl http://127.0.0.1:5984/blog/_design/docs/_view/by_date?key='"2009/01/30%2018:04:11"'
{"total_rows":1,"offset":0,"rows":[
{"id":"biking","key":"2009/01/30 18:04:11","value":"Biking"}
]}
+9

, , :

/by_date?key='"2009/01/30%2015:52:20"'
+1
source

All Articles