sunspot: Sunspot.index! no longer works after upgrading to 2.2.7
After upgrading to version 2.2.7 i’m getting error on Sunspot.index! execution
RSolr::Error::Http: RSolr::Error::Http - 400 Bad Request
Error: {"responseHeader":{"status":400,"QTime":0},"error":{"msg":"Unexpected character '[' (code 91) in prolog; expected '<'\n at [row,col {unknown-source}]: [1,1]","code":400}}
Trace:
Backtrace: /app/vendor/bundle/ruby/2.4.0/gems/rsolr-2.0.1/lib/rsolr/client.rb:193:in `rescue in execute'
/app/vendor/bundle/ruby/2.4.0/gems/rsolr-2.0.1/lib/rsolr/client.rb:185:in `execute'
/app/vendor/bundle/ruby/2.4.0/gems/rsolr-2.0.1/lib/rsolr/client.rb:180:in `send_and_receive'
/app/vendor/bundle/ruby/2.4.0/gems/sunspot_rails-2.2.7/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.2/lib/active_support/notifications.rb:164:in `block in instrument'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.2/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.2/lib/active_support/notifications.rb:164:in `instrument'
/app/vendor/bundle/ruby/2.4.0/gems/sunspot_rails-2.2.7/lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation'
(eval):2:in `post'
/app/vendor/bundle/ruby/2.4.0/gems/rsolr-2.0.1/lib/rsolr/client.rb:83:in `update'
/app/vendor/bundle/ruby/2.4.0/gems/rsolr-2.0.1/lib/rsolr/client.rb:102:in `add'
from /app/vendor/bundle/ruby/2.4.0/gems/rsolr-2.0.1/lib/rsolr/client.rb:193:in `rescue in execute'
from /app/vendor/bundle/ruby/2.4.0/gems/rsolr-2.0.1/lib/rsolr/client.rb:185:in `execute'
from /app/vendor/bundle/ruby/2.4.0/gems/rsolr-2.0.1/lib/rsolr/client.rb:180:in `send_and_receive'
from /app/vendor/bundle/ruby/2.4.0/gems/sunspot_rails-2.2.7/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation'
from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.2/lib/active_support/notifications.rb:164:in `block in instrument'
from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.2/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.2/lib/active_support/notifications.rb:164:in `instrument'
from /app/vendor/bundle/ruby/2.4.0/gems/sunspot_rails-2.2.7/lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation'
from (eval):2:in `post'
from /app/vendor/bundle/ruby/2.4.0/gems/rsolr-2.0.1/lib/rsolr/client.rb:83:in `update'
from /app/vendor/bundle/ruby/2.4.0/gems/rsolr-2.0.1/lib/rsolr/client.rb:102:in `add'
from /app/vendor/bundle/ruby/2.4.0/gems/sunspot-2.2.7/lib/sunspot/indexer.rb:127:in `add_documents'
from /app/vendor/bundle/ruby/2.4.0/gems/sunspot-2.2.7/lib/sunspot/indexer.rb:134:in `add_batch_documents'
from /app/vendor/bundle/ruby/2.4.0/gems/sunspot-2.2.7/lib/sunspot/indexer.rb:26:in `add'
from /app/vendor/bundle/ruby/2.4.0/gems/sunspot-2.2.7/lib/sunspot/session.rb:91:in `index'
from /app/vendor/bundle/ruby/2.4.0/gems/sunspot-2.2.7/lib/sunspot/session.rb:98:in `index!'
from /app/vendor/bundle/ruby/2.4.0/gems/sunspot-2.2.7/lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `index!'
from /app/vendor/bundle/ruby/2.4.0/gems/sunspot-2.2.7/lib/sunspot.rb:196:in `index!'
from (irb):4
Downgrading to 2.2.5 helped me. But 2.2.5 has a lot of things that will be deprecated soon.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 18 (5 by maintainers)
Commits related to this issue
- インデックス再作成ãRSolrがHTTP Status 400を返す部分の修正 https://github.com/sunspot/sunspot/issues/856 — committed to orumin/enju_leaf by orumin 5 years ago
For now I’ve fixed with a
gem "rsolr", "<2"in my Gemfile. I agree there’s something odd going on.