Pragrammist opened a new issue, #5396:
URL: https://github.com/apache/couchdb/issues/5396

   [NOTE]: # ( ^^ Provide a general summary of the issue in the title above. ^^ 
)
   
   ## Description
   
   [NOTE]: # ( Describe the problem you're encountering. )
   [TIP]:  # ( Do NOT give us access or passwords to your actual CouchDB! )
   When you pass "key" query to GET /{db}/_design/{ddoc}/_view/{view}
   for example  /your_db/_design/your_doc/_view/some_view?key="some_exist_key" 
works fine, it return rows if it match.
   But if you use json as key: 
/your_db/_design/your_doc/_view/some_view?key={"json_example": 
"some_exist_key"} for example will not return any row even if {"json_example": 
"some_exist_key"} as key exist.
   ## Steps to Reproduce
   
   [NOTE]: # ( Include commands to reproduce, if possible. curl is preferred. )
   I use it
   
   
http://admin:admin@localhost:5984/account_documents/_design/unique_data_design_doc/_view/account_id_rev_by_hash_password_login?key={"login":
 "login_2","password_hash": "XKJyibT/PjDRPy2X/DP86v12ZmzKdHuVudId5E0+4ts"}
   
   with view
   ```js
   function (doc) {
     emit({login:doc.login, password_hash:doc.password_hash}, [doc._id, 
doc._rev]);
   }
   ```
   If you want reproduce bag, just add document and then view with json as key 
and then try retrieve by then key row, you got empty row array
   
   ## Expected Behaviour
   Possibility to retrieve document by json not only by string, so key like 
   ```json
   {"login": "login_2","password_hash": 
"XKJyibT/PjDRPy2X/DP86v12ZmzKdHuVudId5E0+4ts"} 
   ```
   will return not empty array rows if key is exists
   
   
   [NOTE]: # ( Tell us what you expected to happen. )
   
   ## Your Environment
   I think it's not matter
   [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.4.2
   * Browser name and version:  edge, postman
   * Operating system and version: windows 10
   
   ## Additional Context
   
   [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.

To unsubscribe, e-mail: notifications-unsubscr...@couchdb.apache.org.apache.org

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

Reply via email to