minor changes to search index logic