Adding indexes to directories.