50
53
print ("updating documents backwards");
51
54
// Move all documents to the beginning by growing them to sizes that should
52
55
// fit the holes we made in phase 1
53
57
for (i = doccount*2; i > doccount; --i) {
54
58
mdc.update( { _id:i, x:i }, { _id:i, x:bigstring } );
56
59
bigstring = bigstring.slice(0, -1); // remove last char