I am following this tutorial to index pdf document to solr
https://cbpowell.wordpress.com/2012/09/18/indexing-rich-documents-with-rails-sunspot-solr-sunspot-cell-and-carrierwave-cookbook-style/
And my model is
class Manual < ActiveRecord::Base
mount_uploader :pdf_document, PdfUploader
before_save :update_upload_attributes
# Sunspot indexing configuration
searchable do
# Regular fields that I want indexed
text :name
# For Sunspot Cell. The 'attachment' directive instructs
# Cell how to get the binary data. My understanding is that
# this *must* end in _attachment
attachment :pdf_document
end
private
def update_upload_attributes
if pdf_document.present? && pdf_document_changed?
self.content_type = pdf_document.file.content_type
self.file_size = pdf_document.file.size
self.file_name = File.basename(pdf_document.url)
end
end
end
But when I try to reindex I get the following error
Error - RSolr::Error::Http - 500 Internal Server Error - retrying...
Error - RSolr::Error::Http - 500 Internal Server Error - ignoring...
[####################################] [2/2] [100.00%] [00:00] [00:00] [54.90/s]
And when I try to submit the form I get following error
RSolr::Error::Http (RSolr::Error::Http - 500 Internal Server Error
Error: {'error'=>{'msg'=>'java.lang.AbstractMethodError','trace'=>'java.lang.RuntimeException: java.lang.AbstractMethodError