public function is_server_ready() {

        $configured = $this->is_server_configured();
        if ($configured !== true) {
            return $configured;
        }

        // As part of the above we have already checked that we can contact the server. For pages
        // where performance is important, we skip doing a full schema check as well.
        if ($this->should_skip_schema_check()) {
            return true;
        }

        // Update schema if required/possible.
        $schemalatest = $this->check_latest_schema();
        if ($schemalatest !== true) {
            return $schemalatest;
        }

        // Check that the schema is already set up.
        try {
            $schema = new \search_solr\schema();
            $schema->validate_setup();
        } catch (\moodle_exception $e) {
            return $e->getMessage();
        }

        return true;
    }
public function is_server_ready() {

        $configured = $this->is_server_configured();
        if ($configured !== true) {
            return $configured;
        }

        // As part of the above we have already checked that we can contact the server. For pages
        // where performance is important, we skip doing a full schema check as well.
        if ($this->should_skip_schema_check()) {
            return true;
        }

        // Update schema if required/possible.
        $schemalatest = $this->check_latest_schema();
        if ($schemalatest !== true) {
            return $schemalatest;
        }

        // Check that the schema is already set up.
        try {
            $schema = new \search_solr\schema();
            $schema->validate_setup();
        } catch (\moodle_exception $e) {
            return $e->getMessage();
        }

        return true;
    }
public function is_server_ready ( ) { $ configured = $ this -> is_server_configured ( ) ; if ( $ configured !== true ) { return $ configured ; } // As part of the above we have already checked that we can contact the server. For pages // where performance is important, we skip doing a full schema check as well. if ( $ this -> should_skip_schema_check ( ) ) { return true ; } // Update schema if required/possible. $ schemalatest = $ this -> check_latest_schema ( ) ; if ( $ schemalatest !== true ) { return $ schemalatest ; } // Check that the schema is already set up. try { $ schema = new \ search_solr \ schema ( ) ; $ schema -> validate_setup ( ) ; } catch ( \ moodle_exception $ e ) { return $ e -> getMessage ( ) ; } return true ; }
Pings the Solr server using search_solr config

@return true|string Returns true if all good or an error string.
Pings the Solr server using search_solr config