move IndexSearch class to indexsearch.js