Read more

Sunspot for Solr fails with '400 Bad Request' in 'adapt_response'

Thomas Eisenbarth
February 01, 2012Software engineer at makandra GmbH

If Sunspot does not work and fails with a backtrace similar to this:

/project/shared/bundle/ruby/1.8/gems/rsolr-1.0.6/lib/rsolr/client.rb:227:in `adapt_response'
/project/shared/bundle/ruby/1.8/gems/rsolr-1.0.6/lib/rsolr/client.rb:164:in `execute'
/project/shared/bundle/ruby/1.8/gems/rsolr-1.0.6/lib/rsolr/client.rb:158:in `send_and_receive'
(eval):2:in `post'
Illustration money motivation

Opscomplete powered by makandra brand

Save money by migrating from AWS to our fully managed hosting in Germany.

  • Trusted by over 100 customers
  • Ready to use with Ruby, Node.js, PHP
  • Proactive management by operations experts
Read more Show archive.org snapshot

then the schema.xml that is shipped with Sunspot is not loaded into Solr correctly.

Often the latter can be found in /etc/solr/conf/schema.xml. So copy Sunspot's schema.xml there, restart Solr and you should be fine.

Posted by Thomas Eisenbarth to makandra dev (2012-02-01 15:43)