Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #25585, comment 10


Ignore:
Timestamp:
10/15/2013 08:39:30 PM (11 years ago)
Author:
azaozz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #25585, comment 10

    initial v1  
    55The idea is to remove single letter terms from the search. The pattern `/^\p{L}$/u` is the safest way to match a single letter in any language. It's not particularly fast as it looks through the Unicode character properties. A better (but quite slower) pattern could be `/^\p{L}\p{M}*|\p{Z}|\p{P}|\p{C}$/u` which also matches separators (any kind of whitespace or invisible separators), punctuation, and invisible control characters and unused code points.
    66
    7 `search_terms_count` is the count before the terms were cleaned. It's used to determine if the sorting would use AND and OR for the title, or just the sentence match. This part of parse_search_order() has gone through quite a few changes, maybe there is a simpler way to do that now.
     7`search_terms_count` is the count before the terms were cleaned. It's used to determine if the sorting would use CASE and match in both title and content, or just a sentence match. This part of parse_search_order() has gone through quite a few changes, maybe there is a simpler way to do that now.