update search logic and support search for priority
merge