fix the bug for method updateIndexTable, test with the main, and has the
same result as the one if we populate the data first and then create the
index on it