简体   繁体   中英

RSolr::Error::Http: RSolr::Error::Http - 400 Bad Request error?

I'm trying to index rich documents but I'm facing some issues. I'm following this link:

http://cbpowell.wordpress.com/2012/09/18/indexing-rich-documents-with-rails-sunspot-solr-sunspot-cell-and-carrierwave-cookbook-style/

$rake sunspot:reindex

rake aborted!

RSolr::Error::Http: RSolr::Error::Http - 400 Bad Request

Error: {'responseHeader'=>{'status'=>400,'QTime'=>29},'error'=>{'msg'=>'undefined field type','code'=>400}}

Request Data: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><delete><query>type:Article</query></delete>"

Note: Solr we are configured manually (not inside application)

http://archive.apache.org/dist/lucene/solr/4.7.0/

If you are using solr 4.7.0 please pay attention to tika-core-xxjar and tika-parser-xxjar files. sunspot_cell_jars gem includes outdated version for both of them (check this page www.java2s.com/Code/Jar/t/tika.htm to find correct version for yours configuration)

Also you can try use updated sunspot_cell gem

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM