add "search" function. /foo/search