You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/06/08 05:27:46 UTC

[GitHub] [couchdb] hamiltonsalazar opened a new issue #2932: Find One on view=> curl: (52) Empty reply from server

hamiltonsalazar opened a new issue #2932:
URL: https://github.com/apache/couchdb/issues/2932


   [NOTE]: # ( ^^ Provide a general summary of the issue in the title above. ^^ )
   
   ## Description
   
   I followed the instructions in the documentation for [Find One](https://docs.couchdb.org/en/stable/ddocs/views/intro.html#find-one) on a view, but that don't work for me.
   
   [NOTE]: # ( Describe the problem you're encountering. )
   [TIP]:  # ( Do NOT give us access or passwords to your actual CouchDB! )
   
   ## Current Behavior
   
   I followed every step to create a view with the function map: 
   
   `function(doc) {
       if(doc.date && doc.title) {
           emit(doc.date, doc.title);
       }
   }`
   
   And i have aggregate the three example documents. 
   
   When i query the view with `/database/_design/designdocname/_view/viewname` for me `curl -X GET http://anna:secret@localhost:5984/views/_design/myDesignDoc/_view/firstView` I get the next result:
   
   > `{
       "total_rows":3,"offset":0,"rows":[
           {
               "id":"hello-world",
               "key":"2009/01/15 15:52:20",
               "value":"Hello World"
           },
           {
               "id":"biking",
               "key":"2009/01/30 18:04:11",
               "value":"Biking"
           },
           {
               "id":"bought-a-cat",
               "key":"2009/02/17 21:13:39",
               "value":"Bought a Cat"
           }
       ]
   }`
   
   But when I try to find a single document with `/blog/_design/docs/_view/by_date?key="2009/01/30 18:04:11"` doesn't work. 
   
   I use `curl -X GET http://anna:secret@localhost:5984/views/_design/myDesignDoc/_view/by_date?key="2009/01/30 18:04:11"` and CouchDBrespond with: 
   
   > curl: (52) Empty reply from server
   
   Also i try with `curl -X GET http://anna:secret@localhost:5984/views/_design/myDesignDoc/_view/firstView/by_date?key="2009/01/30 18:04:11"` and CouchDBrespond again with: 
   
   > curl: (52) Empty reply from server
   
   
   [NOTE]: # ( Include commands to reproduce, if possible. curl is preferred. )
   
   ## Expected Behaviour
   
   I should get the “Biking” blog post: 
   
   > {
               "id":"biking",
               "key":"2009/01/30 18:04:11",
               "value":"Biking"
           }
   
   
   [NOTE]: # ( Tell us what you expected to happen. )
   
   ## Your Environment
   
   [TIP]:  # ( Include as many relevant details about your environment as possible. )
   [TIP]:  # ( You can paste the output of curl http://YOUR-COUCHDB:5984/ here. )
   
   * CouchDB version used: 3.1.0
   * Operating system and version: Windows 10 Pro 1909
   
   
   
   ## Additional Context
   
   I have the three documents load in CouchDB: 
   ![image](https://user-images.githubusercontent.com/36459473/83995361-d1ab5100-a91e-11ea-8910-8a10f99e69b6.png)
   
   
   [TIP]:  # ( Add any other context about the problem here. )
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb] wohali closed issue #2932: Find One on view=> curl: (52) Empty reply from server

Posted by GitBox <gi...@apache.org>.
wohali closed issue #2932:
URL: https://github.com/apache/couchdb/issues/2932


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org