WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #21688, comment 14


Ignore:
Timestamp:
09/05/2012 11:22:12 PM (7 years ago)
Author:
azaozz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #21688, comment 14

    initial v1  
    22> The string length has a very loose correlation to the relevance of the word in a search.
    33
    4 Right. However out search doesn't use word boundaries, it uses `LIKE '%term%'` not `REGEXP '[[:<:]]term[[:>:]]'` so it matches inside words too. This has it's advantages (quite faster, matches different forms of the same word, etc.) but also makes matching of most very short terms irrelevant as they will match all or nearly all posts.
     4Right. However our search doesn't use word boundaries, it uses `LIKE '%term%'` not `REGEXP '[[:<:]]term[[:>:]]'` so it matches inside words too. This has it's advantages (quite faster, matches different forms of the same word, etc.) but also makes matching of most very short terms irrelevant as they will match all or nearly all posts.
    55
    66With the current patch and the patch from #7394 terms like TV, 3G, MD, UK, US, etc. will not be used when in a multi-word search but will be used for sorting the results as part of the whole search string. Also when a search is only for a short word, the search string is used literally.