public function setup($checkexisting = true) {
        $fields = \search_solr\document::get_default_fields_definition();

        // Field id is already there.
        unset($fields['id']);

        $this->check_index();

        $return = $this->add_fields($fields, $checkexisting);

        // Tell the engine we are now using the latest schema version.
        $this->engine->record_applied_schema_version(document::SCHEMA_VERSION);

        return $return;
    }
public function setup($checkexisting = true) {
        $fields = \search_solr\document::get_default_fields_definition();

        // Field id is already there.
        unset($fields['id']);

        $this->check_index();

        $return = $this->add_fields($fields, $checkexisting);

        // Tell the engine we are now using the latest schema version.
        $this->engine->record_applied_schema_version(document::SCHEMA_VERSION);

        return $return;
    }
public function setup ( $ checkexisting = true ) { $ fields = \ search_solr \ document :: get_default_fields_definition ( ) ; // Field id is already there. unset ( $ fields [ 'id' ] ) ; $ this -> check_index ( ) ; $ return = $ this -> add_fields ( $ fields , $ checkexisting ) ; // Tell the engine we are now using the latest schema version. $ this -> engine -> record_applied_schema_version ( document :: SCHEMA_VERSION ) ; return $ return ; }
Setup solr stuff required by moodle.

@param  bool $checkexisting Whether to check if the fields already exist or not
@return bool
Setup solr stuff required by moodle .