Inserting rand_int for document querys.