Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Given the following document structure:
- {
- '_id' : 'someid',
- '_rev' : 'somerev',
- 'metadata' : {
- 'participation' : {
- 'read' : [1,2,3,4,5]
- }
- }
- }
- I want to find all documents in a database where a specific
- value **does not** exist in the `metadata.participation.read`
- array
- Querying for documents in which **metadata.participation.read**
- contains the specific value has been easy:
- function(doc) {
- doc['metadata']['participation']['read'].forEach(function(user_id) {
- emit(user_id, doc._id);
- });
- }
Add Comment
Please, Sign In to add comment