UI side code for locality search.