Reputation: 21775
I have a similar issue that Solr with Rails - rake sunspot:reindex is not working.
I have these in my Gemfile:
gem 'sunspot_solr', github: 'sunspot/sunspot', branch: 'master'
gem 'sunspot_rails', github: 'sunspot/sunspot', branch: 'master'
And:
bundle exec rake sunspot:solr:start
works fine, but when I do:
bundle exec rake sunspot:solr:reindex
I get:
Connection refused - {:data=>
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><delete><query>type:Service</query></delete>",
:headers=>{"Content-Type"=>"text/xml"}, :method=>:post, :params=>{:wt=>:ruby},
:query=>"wt=ruby", :path=>"update", :uri=>
#<URI::HTTP:0x007fccf982f348 URL:http://localhost:8982/solr/default/update?wt=ruby>,
:open_timeout=>nil, :read_timeout=>nil, :retry_503=>nil,
:retry_after_limit=>nil}
Upvotes: 3
Views: 1687
Reputation: 21775
I added path to sunspot.yml
development:
solr:
hostname: localhost
port: 8982
log_level: INFO
path: /solr/development
test:
solr:
hostname: localhost
port: 8981
log_level: WARNING
path: /solr/test
Not sure if this good enough though. Seems this is because I am using Solr 4 and configuration is creating solr/environment
type URLs.
Upvotes: 3