SilverStripe 2.4 API Docs
  • Package
  • Class
  • Tree
  • Deprecated
Version: master
  • master
  • 3.1
  • 3.0
  • 2.4
  • tagfield

Packages

  • cms
    • assets
    • batchaction
    • batchactions
    • bulkloading
    • comments
    • content
    • core
    • export
    • publishers
    • reports
    • security
    • tasks
  • forms
    • actions
    • core
    • fields-basic
    • fields-dataless
    • fields-datetime
    • fields-files
    • fields-formatted
    • fields-formattedinput
    • fields-relational
    • fields-structural
    • transformations
    • validators
  • installer
  • None
  • PHP
  • sapphire
    • api
    • bulkloading
    • control
    • core
    • cron
    • dev
    • email
    • fields-formattedinput
    • filesystem
    • formatters
    • forms
    • i18n
    • integration
    • misc
    • model
    • parsers
    • search
    • security
    • tasks
    • testing
    • tools
    • validation
    • view
    • widgets

Classes

  • AdvancedSearchForm
  • ContentControllerSearchExtension
  • EndsWithFilter
  • ExactMatchFilter
  • ExactMatchMultiFilter
  • FulltextFilter
  • FulltextSearchable
  • GreaterThanFilter
  • LessThanFilter
  • NegationFilter
  • PartialMatchFilter
  • SearchContext
  • SearchFilter
  • SearchForm
  • StartsWithFilter
  • StartsWithMultiFilter
  • SubstringFilter
  • WithinRangeFilter

Class FulltextFilter

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:

static $indexes = array(
   'SearchFields' => 'fulltext(Name, Title, Description)'
);
Object
Extended by SearchFilter
Extended by FulltextFilter
Package: sapphire\search
Located at sapphire/search/filters/FulltextFilter.php

Methods summary

public SQLQuery
# apply( SQLQuery $query )

Apply filter criteria to a SQL query.

Apply filter criteria to a SQL query.

Parameters

$query
SQLQuery
$query

Returns

SQLQuery
public boolean
# isEmpty( )

Determines if a field has a value, and that the filter should be applied. Relies on the field being populated with SearchFilter::setValue()

Determines if a field has a value, and that the filter should be applied. Relies on the field being populated with SearchFilter::setValue()

Returns

boolean

Overrides

SearchFilter::isEmpty

Methods inherited from SearchFilter

__construct(), addRelation(), applyRelation(), getDbFormattedValue(), getDbName(), getFullName(), getName(), getValue(), setModel(), setValue()

Methods inherited from Object

__call(), __toString(), addMethodsFrom(), addStaticVars(), addWrapperMethod(), add_extension(), add_static_var(), allMethodNames(), cacheToFile(), cacheToFileWithArgs(), clearCache(), combined_static(), create(), createMethod(), create_from_string(), defineMethods(), exists(), extInstance(), extend(), getCustomClass(), getExtensionInstance(), getExtensionInstances(), get_extensions(), get_static(), hasExtension(), hasMethod(), has_extension(), invokeWithExtensions(), is_a(), loadCache(), parentClass(), parse_class_spec(), remove_extension(), sanitiseCachename(), saveCache(), set_stat(), set_static(), set_uninherited(), stat(), strong_create(), uninherited(), uninherited_static(), useCustomClass()

Magic methods summary

Properties summary

Properties inherited from SearchFilter

$fullName, $model, $name, $relation, $value

Properties inherited from Object

$class, $extension_instances, $extensions

Comments

Comment policy: Please use comments for tips and corrections about the described functionality. Comments are moderated, we reserve the right to remove comments that are inappropriate or are no longer relevant.
Use the Silverstripe Forum to ask questions.
blog comments powered by Disqus
SilverStripe 2.4 API Docs API documentation generated by ApiGen 2.8.0