Merge indexes script