Skip to content

Instantly share code, notes, and snippets.

@bryanl
Created October 28, 2008 11:21
Show Gist options
  • Select an option

  • Save bryanl/20351 to your computer and use it in GitHub Desktop.

Select an option

Save bryanl/20351 to your computer and use it in GitHub Desktop.
You the couchview tool, you couldn't normally build the view in view.json. There were no constructs for the index key.
What I propose is to use a configuration file to add other keys to the view.
function(doc) {
emit(doc.id, doc.value);
}
{
"_id": "_design/rules",
"_rev": "999203757",
"views": {
"by_id-map": {
"map": "function(doc) {emit(doc.id,doc.value);}",
"index": "fti"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment