简体   繁体   English

actions_as_ferret多模型搜索在Rails应用中不起作用

[英]acts_as_ferret multi model search not working in rails app

I am trying to solve a strange issue with ferret/acts_as_ferret 我正在尝试解决雪貂/ acts_as_ferret的一个奇怪的问题

Of course I have googled and posted the question: http://www.ruby-forum.com/topic/188570 当然,我已经在Google上搜索并发布了问题: http : //www.ruby-forum.com/topic/188570

Basically aaf works on single models with no issue. 基本上aaf可以在单个模型上运行,没有问题。 It also works on single models using the config/aaf.rb file I have setup. 它也可以使用我已设置的config / aaf.rb文件在单个模型上使用。 It even works when I do a multi-model search in the console, but within the rails app itself I get: 当我在控制台中进行多模型搜索时,它甚至可以工作,但是在rails应用程序本身中,我得到了:

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. PS:我按照以下教程操作,以了解现在的状况。 http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret

Do you have the plugin installed or just the gem? 您安装了插件还是仅安装了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. 出于我的目的,我改用Solr,生活变得轻松多了。 Sphinx is missing a lot of stuff that I need. Sphinx缺少了很多我需要的东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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