blacklight icon indicating copy to clipboard operation
blacklight copied to clipboard

Solr-Configuration page not up to date

Open beyto1974 opened this issue 5 years ago • 2 comments

Hi,

In https://github.com/projectblacklight/blacklight/wiki/Solr-Configuration:

Blacklight::SolrRepository should be Blacklight::Solr::Repository MyCustomSolrRepository, "def blacklight_solr" should be "def build_connection".

But I still cannot get it working. MyApplicationRuntimeConfiguration, "def solr_repository" is not called.

How would this work on Blacklight 7 (commit 984feb9)?

Thanks,

beyto1974 avatar Jun 05 '19 09:06 beyto1974

I got it working using code in application_controller.php (in this case user based core):

class ApplicationController < ActionController::Base
  before_action :setup_core

def setup_core
    core="blacklight-core"
    if current_user then
        core=current_user.core
    end
    blacklight_config.connection_config = {
      url: "http://127.0.0.1:8983/solr/"+core
    }
end

beyto1974 avatar Jun 07 '19 08:06 beyto1974

I have the same problem. Do you have a solution now

kuangviyu avatar Nov 18 '20 06:11 kuangviyu