fix to the generateDocid() function so that the docid generated always is bigger than the earlier one.
fix to the generateDocid() function so that the docid generated always is bigger than the earlier one.