Search redesign for 1.0

Desired features
Low-level
 * wildcards
 * short names
 * i18n: stopwords, min length
 * stopwords
 * non-latin symbols failing
 * literal URl search
 * user search should not require exact match
 * like search stuff
 * paging for API

Filtering
 * search within an individual user's notices
 * filter notice stream by profile_id
 * people search function - include subscription tags? [are those public? could at least use own maybe]
 * filter people by sub tags
 * search based on location
 * filter notice stream by location/distance
 * filter people by location/distance
 * hide blocked users from search results

Output
 * RSS for people search results

Current infrastructure
As of 0.9.x....

SearchEngine parent class and children in lib/search_engines.php...
 * you take your given class and initialize it with a target table (notice or profile)
 * you toss an opaque query into it with $engine->query
 * that loads up something into a DB_DataObject in $engine->target
 * you go through that list outputting things

Problems:
 * can only support specific tables mentioned
 * fields and filtering are not really provided as options; the query type is fixed to the table

MySQL fulltext

 * profile
 * MATCH(nickname, fullname, location, bio, homepage) AGAINST (q IN BOOLEAN MODE)
 * and does a second with strtolower if query isn't all lowercase [may break on utf-8]
 * notice
 * excludes (notice.is_local = Notice::GATEWAY)
 * MATCH(content) AGAINST (q IN BOOLEAN MODE)
 * also does the second with strtolower if query isn't all lowercase

MySQL LIKE

 * profile
 * (nickname LIKE "%q%" OR
 * fullname LIKE "%q%" OR
 * location LIKE "%q%" OR
 * bio     LIKE "%q%" OR
 * homepage LIKE "%q%")
 * notice
 * not excluding gatewayed notices
 * content LIKE "%q%"

PostgreSQL

 * profile
 * textsearch @@ plainto_tsquery(q)
 * notice
 * not excluding gatewayed notices
 * to_tsvector('english', content) @@ plainto_tsquery(s)

Sphinx plugin

 * profile
 * passes query through to Sphinx
 * indexing query:
 * sql_query              = SELECT id, UNIX_TIMESTAMP(created) as created_ts, nickname, fullname, location, bio, homepage FROM profile
 * sql_query_info         = SELECT * FROM profile where id = $id
 * notice
 * passes query through to Sphinx
 * not excluding gatewayed notices
 * sql_query              = SELECT id, UNIX_TIMESTAMP(created) as created_ts, content FROM notice
 * sql_query_info         = SELECT * FROM notice where notice.id = $id AND notice.is_local != -2