Skip to content

Instantly share code, notes, and snippets.

@bastman
Created November 7, 2012 16:22
Show Gist options
  • Save bastman/4032596 to your computer and use it in GitHub Desktop.
Save bastman/4032596 to your computer and use it in GitHub Desktop.
_design/migrating/sync_machine_logic
_design/migrating/sync_machine_logic
function (doc, meta) {
if (meta.type == "json") {
// If the document is JSON, sort by the schema
var splitId = meta.id.split(":");
if(splitId[0] == 'game' && splitId[1] == 'logic'){
emit(splitId[0], null);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment