fix routeParam issue and refactor search controller