Fix com_search logic for 'all phrase' type of search #5079