Update searching logic.