Build index.