[WIP] Selector-based simple views #5310
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:[email protected]:15984)
Query the silly selector thinger
Query the even sillier one without a selector. Pick docs based on
keys
only.