code: function nudgeNewPeers(callback) {
        // Nudge down the pages that should now follow us
        // Leave reserved range alone
        // Always remember multi: true
        apos.pages.update({ path: new RegExp('^' + RegExp.quote(parent.path + '/')), level: parent.level + 1, rank: { $gte: rank, $lte: 1000000 } }, { $inc: { rank: 1 } }, { multi: true }, function(err, count) {
          return callback(err);
        });
      }
docs: This results in problems if the target is below us, and it really doesn't matter if there are gaps between ranks. -Tom  function nudgeOldPeers(callback) { // Nudge up the pages that used to follow us // Leave reserved range alone var oldParentPath = path.dirname(moved.path); apos.pages.update({ path: new RegExp('^' + RegExp.quote(oldParentPath + '/')), level: moved.level, rank: { $gte: moved.rank, $lte: 1000000 }}, { $inc: { rank: -1 } }, { multi: true }, function(err, count) { return callback(err); }); }