original_string: public function is_server_configured() {
  
          if (empty($this->config->server_hostname) || empty($this->config->indexname)) {
              return 'No solr configuration found';
          }
  
          if (!$client = $this->get_search_client(false)) {
              return get_string('engineserverstatus', 'search');
          }
  
          try {
              if ($this->get_solr_major_version() < 4) {
                  // Minimum solr 4.0.
                  return get_string('minimumsolr4', 'search_solr');
              }
          } catch (\SolrClientException $ex) {
              debugging('Solr client error: ' . html_to_text($ex->getMessage()), DEBUG_DEVELOPER);
              return get_string('engineserverstatus', 'search');
          } catch (\SolrServerException $ex) {
              debugging('Solr server error: ' . html_to_text($ex->getMessage()), DEBUG_DEVELOPER);
              return get_string('engineserverstatus', 'search');
          }
  
          return true;
      }
code: public function is_server_configured() {
  
          if (empty($this->config->server_hostname) || empty($this->config->indexname)) {
              return 'No solr configuration found';
          }
  
          if (!$client = $this->get_search_client(false)) {
              return get_string('engineserverstatus', 'search');
          }
  
          try {
              if ($this->get_solr_major_version() < 4) {
                  // Minimum solr 4.0.
                  return get_string('minimumsolr4', 'search_solr');
              }
          } catch (\SolrClientException $ex) {
              debugging('Solr client error: ' . html_to_text($ex->getMessage()), DEBUG_DEVELOPER);
              return get_string('engineserverstatus', 'search');
          } catch (\SolrServerException $ex) {
              debugging('Solr server error: ' . html_to_text($ex->getMessage()), DEBUG_DEVELOPER);
              return get_string('engineserverstatus', 'search');
          }
  
          return true;
      }
code_tokens: public function is_server_configured ( ) { if ( empty ( $ this -> config -> server_hostname ) || empty ( $ this -> config -> indexname ) ) { return 'No solr configuration found' ; } if ( ! $ client = $ this -> get_search_client ( false ) ) { return get_string ( 'engineserverstatus' , 'search' ) ; } try { if ( $ this -> get_solr_major_version ( ) < 4 ) { // Minimum solr 4.0. return get_string ( 'minimumsolr4' , 'search_solr' ) ; } } catch ( \ SolrClientException $ ex ) { debugging ( 'Solr client error: ' . html_to_text ( $ ex -> getMessage ( ) ) , DEBUG_DEVELOPER ) ; return get_string ( 'engineserverstatus' , 'search' ) ; } catch ( \ SolrServerException $ ex ) { debugging ( 'Solr server error: ' . html_to_text ( $ ex -> getMessage ( ) ) , DEBUG_DEVELOPER ) ; return get_string ( 'engineserverstatus' , 'search' ) ; } return true ; }
docstring: Is the solr server properly configured?.
  
  @return true|string Returns true if all good or an error string.
docstring_tokens: Is the solr server properly configured? .