Add index for task collection