class_docstr: This handler handles connection and execution of the Solr SQL statements.
class_docstr_tok: ["This","handler","handles","connection","and","execution","of","the","Solr","SQL","statements","."]
docstr: Set up the connection required by the handler.
  Returns:
      HandlerStatusResponse
docstr_tok: ["Set","up","the","connection","required","by","the","handler",".","Returns",":","HandlerStatusResponse"]
code: def connect(self):
      """
      Set up the connection required by the handler.
      Returns:
          HandlerStatusResponse
      """
      if self.is_connected is True:
          return self.connection
  
      config = {
          "username": self.connection_data.get("username"),
          "password": self.connection_data.get("password"),
          "host": self.connection_data.get("host"),
          "port": self.connection_data.get("port"),
          "server_path": self.connection_data.get(
              "server_path", "solr"
          ),
          "collection": self.connection_data.get("collection"),
          "use_ssl": self.connection_data.get("use_ssl"),
      }
  
      connection = create_engine(
          "solr://{username}:{password}@{host}:{port}/{server_path}/{collection}/sql?use_ssl={use_ssl}".format(
              **config
          )
      )
      self.is_connected = True
      self.connection = connection.connect()
      return self.connection
  
imports: from typing import Optional
  from collections import OrderedDict
  import pandas
  from sqlalchemy import create_engine
  import sqlalchemy_solr
  from mindsdb_sql import parse_sql
  from mindsdb_sql.parser.ast.base import ASTNode
  from mindsdb.utilities import log
  from mindsdb.integrations.libs.base import DatabaseHandler
  from mindsdb.integrations.libs.response import HandlerStatusResponse, HandlerResponse, RESPONSE_TYPE
  from mindsdb.integrations.libs.const import HANDLER_CONNECTION_ARG_TYPE
label_desc: Use image node_id 3 for calling the SolrHandler obj's underlying member method code with example usage: obj.connect() and returns: self, self