Add indexes function.