-
I am using couch db in a project which stores alarm information documents. I'm looking for suggestions for best practices (and example links if possible) to use a view or filter to filter documents based on dynamic (and multiple) filter criteria? For example - assuming a document of
Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi Chris, you will want to use a View or a Mango query. Filters are a red herring for what you are trying to do. For updating a field in all docs: you’ll have to do that yourself: fetch each doc, update the field, save the doc. |
Beta Was this translation helpful? Give feedback.
-
https://docs.couchdb.org/en/stable/partitioned-dbs/index.html#partitions-by-example
This may be a good use case for you.
…On Mon, 24 Aug 2020 at 15:48, ccrotty ***@***.***> wrote:
Janl, thanks for the reply! Is there a practical limit to the number of
views to have? Would it be better to put them each in the their own design
document?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3081 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKTZUWH7DZEFWU3AWL52BTSCJVUHANCNFSM4P77LF4A>
.
|
Beta Was this translation helpful? Give feedback.
Hi Chris,
you will want to use a View or a Mango query.
Filters are a red herring for what you are trying to do.
For updating a field in all docs: you’ll have to do that yourself: fetch each doc, update the field, save the doc.