rewrite search index