Create indexes for directories.