separate logic for search routes (to be used by the map or search field)