Event search logic.