Improve search ranking and add fallback for unmatched queries