[wp-trac] [WordPress Trac] #21688: Add sanity checks and improve performance when searching for posts
WordPress Trac
wp-trac at lists.automattic.com
Sun Aug 26 00:04:53 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):
Replying to [comment:7 toscho]:
> A filter for removed search terms would be useful. This could go into
the PHP language files, eg. `de_DE.php`.
Ha, was thinking just that too :)
Really want to remove "the" from the search terms as it doesn't make sense
at all. A filter that returns an array with common words for exclusion
makes sense. Then it can either be used directly by the localization
file(s) or can pass a CSV list of words to `__()` so each translation can
set them.
> Oh, and please `mb_strlen()`, not `strlen()`. :)
Using `strlen()` is a "trick" to not exclude high UTF-8 chars. In some
languages a word can be a single char, we won't want to exclude these. May
need to look into this more.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21688#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list