add index to search field for js