Updated search match logic.