我一直在尝试(徒劳地)让最新版本的 Sunspot gem(当前为 2.0.0.pre.111215,包含 Solr 3.5)与 Solr Cell 一起使用。
目前,我正在使用旧版本的 Sunspot 与以下插件提供的 Solr Cell - https://github.com/chebyte/sunspot_cell。
此配置的我的 Gemfile 如下;
gem 'sunspot', '1.2.1'
gem 'sunspot_rails'
不幸的是,这种较旧的 Solr/Solr 单元组合不适用于许多较新的 PDF 文件。Apache 推荐的解决方案是升级到两者的最新版本。
Sunspot Solr Cell 螺栓连接似乎没有得到很好的支持。最近更新的版本已从插件切换到 Gem,但我仍然无法让它与最新版本的 Sunspot Gem 一起使用。https://github.com/zheileman/sunspot_cell
有谁知道正确的 Gemfile 配置以使元素一起很好地发挥作用?我最接近的是这个。
gem 'sunspot_cell', :git => 'git://github.com/zheileman/sunspot_cell.git'
gem 'sunspot', :git => "git://github.com/sunspot/sunspot.git"
gem 'sunspot_rails', :git => "git://github.com/sunspot/sunspot.git", :require => "sunspot_rails"
group :development, :test do
gem 'sunspot_solr', :git => "git://github.com/sunspot/sunspot.git"
end
当我运行任何 rake 任务时,我收到以下错误。
uninitialized constant Sunspot::RSolr
如果我暂时将 sunspot_cell gem 注释掉,我可以让 Rake 任务运行,但实际搜索会失败。
我已经尝试在这个 gem中手动使用 Solr jar 文件,而不是 sunspot_solr 中捆绑的那些,但也没有成功。