Note that there are some explanatory texts on larger screens.

plurals
  1. POCouchDB: How to change view function via javascript?
    primarykey
    data
    text
    <p>I am playing around with <a href="http://couchdb.apache.org/" rel="nofollow noreferrer">CouchDB</a> to test if it is "possible" [1] to store scientific data (simulated and experimental raw data + metadata). A big pro is the schema-less approach of CouchDB: we have to be very flexible with the metadata, as the set of parameters changes very often.</p> <p>Up to now I have some code to feed raw data, plots (both as attachments), and hierarchical metadata (as JSON) into CouchDB documents, and have written some prototype Javascript for filtering and showing. But the filtering is done on the client side (a.k.a. browser): The map function simply returns everything.</p> <p>How could I change the (or push a second) map function of a specific _design-document with simple browser-JS?</p> <p>I do not think that a temporary view would yield any performance gain...</p> <p>Thanks for your time and answers.</p> <p>[1]: of course it is possible, but is it also useful? feasible? reasonable?</p> <p><strong>[added]</strong></p> <p>Ah, the jquery.couch.js (version 0.9.0) provides a saveDoc() function, which could update the _design document with the new map function.</p> <p>But I also tried out the query function, which uses a temporary view. Okay, "do not use this in the real product, only during development"... But scientific research <em>is</em> steady development, right?</p> <p>Temporary views are getting cached, as I noticed, and it works well for ~1000 documents per DB. A second plus: all users (think of 1 to 3, so a big user management is quit of an overkill) can work with their own temporary view.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload