[wp-trac] [WordPress Trac] #21688: Add sanity checks and improve performance when searching for posts
WordPress Trac
wp-trac at lists.automattic.com
Sat Aug 25 20:26:11 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 | Keywords:
-------------------------+-----------------------------
The search part of the main query is quite basic. It needs a few sanity
checks that will also improve performance in some cases:
- Search string length. Most browsers would send between 2000 and 8000
(2KB - 8KB) characters in a GET request, including the URL. Search string
longer than 1500 - 1600 chars doesn't make sense (this is urlencoded
length).
- Looking at web search engines data and behavior, most searches are 4
words or less, and searches of more than 7 words are very rare. We should
treat searches with lets say 10 or more terms as "sentence", i.e. match
only the whole search string instead of splitting it and matching word by
word. This would improve both quality of results and speed.
- All search engines discard very common or very short words. We can't get
that sophisticated but can discard terms that are less than 3 characters
long from the word by word part of the search. Again, this would improve
both quality of results and speed.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21688>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list