Try to see what a simple selector-based views might look like. Inspired by comments in the "allow_fallback" pr and the discussion in CouchDB dev meeting.
This is as simple as possible:
We already have support for design doc languages, so go with that: use "selector" as a language, then use the regular _design/../_view API
selector picks documents to be indexed. The usual selector syntax, nothing new
keys - list of field values emitted as the key (an array)
values - list of fields values emitted as the value (an array)
Try to see what a simple selector-based views might look like. Inspired by comments in the "allow_fallback" pr and the discussion in CouchDB dev meeting.
This is as simple as possible:
_design/../_view
APIselector
picks documents to be indexed. The usual selector syntax, nothing newkeys
- list of field values emitted as the key (an array)values
- list of fields values emitted as the value (an array)Example (DB=http://adm:pass@127.0.0.1:15984)
Query the silly selector thinger
Query the even sillier one without a selector. Pick docs based on
keys
only.