update search and return index to inputnew