Select documents that do not have some keys in CouchDB

Having an article document with a built-in array of tags, how do I select articles that do not contain specific tags?

thank

+3
source share
2 answers

It is very easy to create views that exclude documents that do not contain specific tags. This is described here: CouchDB Wiki: Browse Snippets: Retrieve documents without a specific field .

, , , , , , (), . , , . , couchdb IRC (irc://irc.freenode.net/CouchDB). , - .

FWIW, : _list . , , , .

!

+2

, @AviFlax, _list , .
, inisde req.query.

:

GET http://host/db/_design/ddoc/_list/a-list/a-view?some="thing"

some, , , .

function(head, req) {
   var some = req.query.some
   ....
}
0

Source: https://habr.com/ru/post/1768301/


All Articles