On Mon, Jul 4, 2011 at 10:11 AM, Matthew John <[email protected]> wrote: > 2) I understand that all the MR queries (views) to be used in the system has > to be coded in the Design document. Does that mean a super-set of all > possible queries which we might use in the System has to be coded in the > Design doc? Can this be added on the fly (dynamic )
Yes. Query CouchDB does this: https://github.com/iriscouch/query_couchdb Its goal is to clone the Google App Engine query API. Given a (valid) query, it determines the appropriate map/reduce and _view query to get that result. If the map/reduce is not there (HTTP 404), then it will update the design doc and re-query. That project is undocumented, incomplete, and the code is sloppy. However the idea behind it is very good (if I may). As Jens says, in practice, like any production database, you tend to know all of your important queries at development time. During run-time, you just fill in the blanks for the query. -- Iris Couch
