create base route search logic