public function addAllFulltextFields($includeSubclasses = true)
    {
        foreach ($this->getClasses() as $class => $options) {
            $classHierarchy = SearchIntrospection::hierarchy($class, $includeSubclasses, true);

            foreach ($classHierarchy as $dataClass) {
                $fields = DataObject::getSchema()->databaseFields($dataClass);

                foreach ($fields as $field => $type) {
                    list($type, $args) = ClassInfo::parse_class_spec($type);

                    /** @var DBField $object */
                    $object = Injector::inst()->get($type, false, ['Name' => 'test']);
                    if ($object instanceof DBString) {
                        $this->addFulltextField($field);
                    }
                }
            }
        }
    }
public function addAllFulltextFields($includeSubclasses = true)
    {
        foreach ($this->getClasses() as $class => $options) {
            $classHierarchy = SearchIntrospection::hierarchy($class, $includeSubclasses, true);

            foreach ($classHierarchy as $dataClass) {
                $fields = DataObject::getSchema()->databaseFields($dataClass);

                foreach ($fields as $field => $type) {
                    list($type, $args) = ClassInfo::parse_class_spec($type);

                    /** @var DBField $object */
                    $object = Injector::inst()->get($type, false, ['Name' => 'test']);
                    if ($object instanceof DBString) {
                        $this->addFulltextField($field);
                    }
                }
            }
        }
    }
public function addAllFulltextFields ( $ includeSubclasses = true ) { foreach ( $ this -> getClasses ( ) as $ class => $ options ) { $ classHierarchy = SearchIntrospection :: hierarchy ( $ class , $ includeSubclasses , true ) ; foreach ( $ classHierarchy as $ dataClass ) { $ fields = DataObject :: getSchema ( ) -> databaseFields ( $ dataClass ) ; foreach ( $ fields as $ field => $ type ) { list ( $ type , $ args ) = ClassInfo :: parse_class_spec ( $ type ) ; /** @var DBField $object */ $ object = Injector :: inst ( ) -> get ( $ type , false , [ 'Name' => 'test' ] ) ; if ( $ object instanceof DBString ) { $ this -> addFulltextField ( $ field ) ; } } } } }
Add all database-backed text fields as fulltext searchable fields.

For every class included in the index, examines those classes and all subclasses looking for "Text" database
fields (Varchar, Text, HTMLText, etc) and adds them all as fulltext searchable fields.
Add all database - backed text fields as fulltext searchable fields .