handle public search