1 <?php
2 3 4 5
6
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
28 class FulltextFilter extends SearchFilter {
29
30 public function apply(SQLQuery $query) {
31 $query->where(sprintf(
32 "MATCH (%s) AGAINST ('%s')",
33 $this->getDbName(),
34 Convert::raw2sql($this->getValue())
35 ));
36 return $query;
37 }
38
39 public function isEmpty() {
40 return $this->getValue() == null || $this->getValue() == '';
41 }
42 }
43 ?>
[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the
Silverstripe Forums to ask development related questions.
-