You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
701 B
12 lines
701 B
people = ["Marc", "Bill", "George", "Eliot", "Matt", "Trey", "Tracy", "Greg", "Steve", "Kristina", "Katie", "Jeff"];
|
|
|
|
for(var i=0; i<100000; i++){
|
|
name = people[Math.floor(Math.random()*people.length)];
|
|
user_id = i;
|
|
boolean = [true, false][Math.floor(Math.random()*2)];
|
|
added_at = new Date();
|
|
number = Math.floor(Math.random()*10001);
|
|
db.test_collection.save({"name":name, "user_id":user_id, "boolean": boolean, "added_at":added_at, "number":number });
|
|
}
|
|
db.test_collection.ensureIndex({number:1})
|
|
|
|
|