[wp-trac] [WordPress Trac] #21688: Add sanity checks and improve performance when searching for posts

WordPress Trac wp-trac at lists.automattic.com
Tue Aug 28 06:42:01 UTC 2012


#21688: Add sanity checks and improve performance when searching for posts
-------------------------+------------------------------
 Reporter:  azaozz       |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Query        |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+------------------------------

Comment (by azaozz):

 21688-5.patch introduces a private function `_check_search_term()` that
 replaces `_search_terms_tidy()` and tidies and checks each term. Terms of
 2 bytes or less are removed if they don't contain capital letters or
 numbers.

 There are also some other small improvements: remove all \r \n from the
 search string before processing, check if the splitting regexp actually
 matches before using the matches, keep spaces when the search term is in
 double quotes.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21688#comment:15>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list