2008-08-06 05:28:25 +02:00
|
|
|
<?php
|
|
|
|
/**
|
2008-08-09 06:38:44 +02:00
|
|
|
* Filters by full-text matching on the given field.
|
|
|
|
*
|
|
|
|
* Full-text indexes are only available with MyISAM tables. The following column types are
|
|
|
|
* supported:
|
|
|
|
* - Char
|
|
|
|
* - Varchar
|
|
|
|
* - Text
|
|
|
|
*
|
|
|
|
* To enable full-text matching on fields, you also need to add an index to the
|
|
|
|
* database table, using the {$indexes} hash in your DataObject subclass:
|
|
|
|
*
|
|
|
|
* <code>
|
|
|
|
* static $indexes = array(
|
|
|
|
* 'SearchFields' => 'fulltext(Name, Title, Description)'
|
|
|
|
* );
|
|
|
|
* </code>
|
2008-08-06 05:28:25 +02:00
|
|
|
*
|
|
|
|
* @package sapphire
|
|
|
|
* @subpackage search
|
|
|
|
*/
|
2008-08-09 05:54:55 +02:00
|
|
|
class FulltextFilter extends SearchFilter {
|
2008-08-09 06:06:52 +02:00
|
|
|
|
2008-08-09 06:38:44 +02:00
|
|
|
public function apply(SQLQuery $query) {
|
2008-08-09 06:06:52 +02:00
|
|
|
return "";
|
|
|
|
}
|
2008-08-09 06:38:44 +02:00
|
|
|
|
2008-08-06 05:28:25 +02:00
|
|
|
}
|
|
|
|
?>
|