add search index and fix errors