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","."]
code: def __init__(
      self, name: str, connection_data: Optional[dict], **kwargs
  ):
      super().__init__(name)
      self.parser = parse_sql
      self.dialect = "solr"
  
      if (
          ("host" not in connection_data)
          or ("port" not in connection_data)
          or ("collection" not in connection_data)
      ):
          raise Exception(
              "The host, port and collection parameter should be provided!"
          )
  
      optional_parameters = ["use_ssl", "username", "password"]
      for parameter in optional_parameters:
          if parameter not in connection_data:
              connection_data[parameter] = None
  
      if connection_data.get("use_ssl", False):
          connection_data["use_ssl"] = True
      else:
          connection_data["use_ssl"] = False
  
      self.connection_data = connection_data
      self.kwargs = kwargs
  
      self.connection = None
      self.is_connected = False
  
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 1 to create a new SolrHandler object from inherited base classes: DatabaseHandler with example: obj = SolrHandler(name, connection_data)