summaryrefslogtreecommitdiff
path: root/classes/Memcached_DataObject.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-06-21 21:50:35 -0700
committerEvan Prodromou <evan@controlyourself.ca>2009-06-21 21:50:35 -0700
commit876ab059273a5f223170d6b2c0b9b4342b06c50f (patch)
tree5a3f32ead088c405bf24ddff361ed5cbed47db8c /classes/Memcached_DataObject.php
parent02a4ca9e2ea46cb82829dc65e76efc36b0ec470b (diff)
Add like for search
Diffstat (limited to 'classes/Memcached_DataObject.php')
-rw-r--r--classes/Memcached_DataObject.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php
index 2d5a73554..f7cbb9d5b 100644
--- a/classes/Memcached_DataObject.php
+++ b/classes/Memcached_DataObject.php
@@ -193,7 +193,14 @@ class Memcached_DataObject extends DB_DataObject
// unable to connect to sphinx' search daemon
if (!$connected) {
if ('mysql' === common_config('db', 'type')) {
- $search_engine = new MySQLSearch($this, $table);
+ $type = common_config('search', 'type');
+ if ($type == 'like') {
+ $search_engine = new MySQLLikeSearch($this, $table);
+ } else if ($type == 'fulltext') {
+ $search_engine = new MySQLSearch($this, $table);
+ } else {
+ throw new ServerException('Unknown search type: ' . $type);
+ }
} else {
$search_engine = new PGSearch($this, $table);
}