Skip to content

Instantly share code, notes, and snippets.

@indolering
Created November 5, 2016 22:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save indolering/c8fb444beb36fbca7ed4699c31048aac to your computer and use it in GitHub Desktop.
Save indolering/c8fb444beb36fbca7ed4699c31048aac to your computer and use it in GitHub Desktop.
var exams = [];
var exam = doc["Exm0"];
while(exam){
exams.push(exam);
exam = doc["Exm" + exam.length];
}
if(exams.length){
index('exams', exams, {"store":true, "facet": true});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment