def connect
    if defined?(Blacklight)
      solr_config = Blacklight.solr_config
    elsif defined?(Rails.root.to_s)
      solr_config = load_rails_config
    else
      solr_config = load_fallback_config
    end
    
    if index_full_text == true && solr_config.has_key?(:fulltext) && solr_config[:fulltext].has_key?('url')
      solr_config[:url] = solr_config[:fulltext]['url']
    elsif solr_config.has_key?(:default) && solr_config[:default].has_key?('url')
      solr_config[:url] = solr_config[:default]['url']
    elsif !solr_config.has_key?(:url)
      raise "Unable to find a solr url in the config file"
    end

    @solr = RSolr.connect solr_config
  
  rescue RuntimeError => e
    logger.debug "Unable to establish SOLR Connection with #{solr_config.inspect}.  Failed with #{e.message}"
    raise  URI::InvalidURIError
  end
def connect
    if defined?(Blacklight)
      solr_config = Blacklight.solr_config
    elsif defined?(Rails.root.to_s)
      solr_config = load_rails_config
    else
      solr_config = load_fallback_config
    end
    
    if index_full_text == true && solr_config.has_key?(:fulltext) && solr_config[:fulltext].has_key?('url')
      solr_config[:url] = solr_config[:fulltext]['url']
    elsif solr_config.has_key?(:default) && solr_config[:default].has_key?('url')
      solr_config[:url] = solr_config[:default]['url']
    elsif !solr_config.has_key?(:url)
      raise "Unable to find a solr url in the config file"
    end

    @solr = RSolr.connect solr_config
  
  rescue RuntimeError => e
    logger.debug "Unable to establish SOLR Connection with #{solr_config.inspect}.  Failed with #{e.message}"
    raise  URI::InvalidURIError
  end
This method performs initialization tasks


 This method connects to the Solr instance. It looks to see if Blacklight is loaded first for the
 Blacklight.solr_config. If not loaded, it then looks for the Rails.root.to_s/config/solr.yaml file and loads
 it to get the solr url. The configuration strucuture can take both the
 { "development" => {"default" => { "url" => "http://localhost"}, "fulltext" => { "url" => "http://localhost"} }}
 or { "development"=>{"url"=>"http://localhost" }}
 Can also take Blacklight.solr_config["url"] and Blacklight.solr_config[:url]

 If you want to specify a timeout for solr, provide these keys:
   :read_timeout=>120, :open_timeout => 120