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 2021/03/29 20:41:31 UTC

[GitHub] [couchdb] olcoz8 opened a new issue #3474: Generate view and query for nested dictionary in document

olcoz8 opened a new issue #3474:
URL: https://github.com/apache/couchdb/issues/3474


   Generate view and query for nested dictionary in document
   
   ## Expected Behavior
   Having documents following this schema:
   
   ```
   {
     "_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
     "_rev": "x-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
   
     "field_1": "something",
     "field_2": "something",
     "field_3": "something",
   
     "field_of_interest": {
       "id-0": {
         "own_id": "id-0",
         "sub_field_of_interest": "data_a",
         "other_sub_field": "something"
       },
       "id-1": {
         "own_id": "id-1",
         "sub_field_of_interest": "data_b",
         "other_sub_field": "something"
       }
     },
   
     "field_4": something
   }
   ```
   It might be possible to create a view emitting a sub-field of the nested dictionary of the document for getting a query like this:
   
   ```
   "data_a": "id-0"
   "data_b": "id-1"
   ```
   
   ## Current Behavior
   
   I didn't find any option for working with nested dictionaries. All the references similar to this issue addressed nested lists in the document, not a nested dictionary.
   
   ## Possible Solution
   
   Is it possible to work with views and queries with this kind of documents?
   
   ## Your Environment
   Currently, I am working with couchdb through the Python library for Cloudant and CouchDB.


-- 
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 #3474: Generate view and query for nested dictionary in document

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


   


-- 
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