acts_as_ferret 多模型搜索在 Rails 应用程序中不起作用
我正在尝试用 ferret/acts_as_ferret 解决一个奇怪的问题
当然我已经用谷歌搜索并发布了问题: http://www.ruby-forum.com/topic/188570
基本上 aaf 可以工作在单一型号上没有问题。它也适用于使用我设置的 config/aaf.rb 文件的单个模型。当我在控制台中进行多模型搜索时,它甚至可以工作,但在 Rails 应用程序本身中,我得到:
undefined method `ferret_rank=' for <object that has a match>
如果有人有相同的经历/问题并且可以提供任何线索,我将不胜感激。
PS:我按照以下教程到达了现在的位置。 http://opensoul.org/2008/4/29/使用共享索引和acts_as_ferret
I am trying to solve a strange issue with ferret/acts_as_ferret
Of course I have googled and posted the question:
http://www.ruby-forum.com/topic/188570
Basically aaf works on single models with no issue. It also works on single models using the config/aaf.rb file I have setup. It even works when I do a multi-model search in the console, but within the rails app itself I get:
undefined method `ferret_rank=' for <object that has a match>
If anyone has had the same experience/problem and can shed any light I would appreciate it.
PS: I followed the following tutorial to get where I am now.
http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你安装了插件还是只安装了 gem?您可能想安装该插件。
我也会尝试重建索引。
出于我的目的,我切换到 Solr,生活变得轻松多了。 Sphinx 缺少很多我需要的东西。
Do you have the plugin installed or just the gem? You might want to install the plugin.
I would also try rebuilding the index.
For my purposes, I switched to Solr and life is a lot easier. Sphinx is missing a lot of stuff that I need.