Skip to content

Instantly share code, notes, and snippets.

@tzhbami7
Created March 11, 2015 09:55
Show Gist options
  • Save tzhbami7/ba4ac8def1e41e4021c6 to your computer and use it in GitHub Desktop.
Save tzhbami7/ba4ac8def1e41e4021c6 to your computer and use it in GitHub Desktop.
solr fail
tzhbami7@jack-black:~/Code/rails/agricircle$ bundle exec rake crop_import:import
importing crops for planning
rake aborted!
RSolr::Error::Http: RSolr::Error::Http - 400 Bad Request
Error: {'responseHeader'=>{'status'=>400,'QTime'=>1},'error'=>{'msg'=>'ERROR: [doc=Crop 3] unknown field \'name_de_ac\'','code'=>400}}
Request Data: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><add><doc><field name=\"id\">Crop 3</field><field name=\"type\">Crop</field><field name=\"type\">ActiveRecord::Base</field><field name=\"class_name\">Crop</field><field name=\"name_de_s\">Winterweizen</field><field name=\"with_crop_stages_b\">true</field><field name=\"name_de_ac\">Winterweizen</field><field name=\"name_de_dynamic\">Winterweizen</field></doc></add>"
Backtrace: /home/tzhbami7/.rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/rsolr-1.0.10/lib/rsolr/client.rb:283:in `adapt_response'
/home/tzhbami7/.rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/rsolr-1.0.10/lib/rsolr/client.rb:190:in `execute'
/home/tzhbami7/.rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/rsolr-1.0.10/lib/rsolr/client.rb:176:in `send_and_receive'
/home/tzhbami7/.rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/sunspot_rails-2.1.1/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation'
/home/tzhbami7/.rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/activesupport-4.1.8/lib/active_support/notifications.rb:159:in `block in instrument'
/home/tzhbami7/.rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/activesupport-4.1.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/tzhbami7/.rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/activesupport-4.1.8/lib/active_support/notifications.rb:159:in `instrument'
/home/tzhbami7/.rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/sunspot_rails-2.1.1/lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation'
(eval):2:in `post'
/home/tzhbami7/.rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/rsolr-1.0.10/lib/rsolr/client.rb:82:in `update'
/home/tzhbami7/.rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/rsolr-1.0.10/lib/rsolr/client.rb:102:in `add'(eval):2:in `post'
/home/tzhbami7/Code/rails/agricircle/app/models/crop_stage.rb:71:in `index_crop'
/home/tzhbami7/Code/rails/agricircle/app/models/crop.rb:86:in `block in create_additional_crop_stages'
/home/tzhbami7/Code/rails/agricircle/app/models/crop.rb:85:in `each'
/home/tzhbami7/Code/rails/agricircle/app/models/crop.rb:85:in `create_additional_crop_stages'
/home/tzhbami7/Code/rails/agricircle/app/models/lib/crops_importer.rb:32:in `block in import_crops!'
/home/tzhbami7/Code/rails/agricircle/app/models/lib/crops_importer.rb:29:in `each'
/home/tzhbami7/Code/rails/agricircle/app/models/lib/crops_importer.rb:29:in `import_crops!'
/home/tzhbami7/Code/rails/agricircle/app/models/lib/crops_importer.rb:9:in `block in import_and_map_crops'
/home/tzhbami7/Code/rails/agricircle/app/models/lib/crops_importer.rb:7:in `import_and_map_crops'
/home/tzhbami7/Code/rails/agricircle/lib/tasks/crop_import.rake:5:in `block (2 levels) in <top (required)>'
Tasks: TOP => crop_import:import
(See full trace by running task with --trace)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment