Heroku 托管的 Rails 应用程序的最佳搜索选项?
我最近一直在从事一个新项目,其中出色的搜索引擎至关重要。这是一个在heroku上托管的rails3应用程序,我正在寻找可能的解决方案(rubygem将是理想的),它提供了一种简单的方法来进行强大的全文搜索。
现在,我正在使用acts_as_tsearch,它利用PostgreSQL 并执行基本的MATCH 查询。不过,它并没有真正带来好的结果(例如,如果我搜索“创建项目”并且“如何创建项目”作为查询存在,则找不到它)。
有人可以分享他们的全文搜索经验吗?有人尝试过 Solr 吗?
I've been working on a new project lately where a fantastic search engine is crucial. It's a rails3 app hosted on heroku and I'm looking into possible solutions(a rubygem would be ideal) which offer a easy way to have powerful full-text search.
Right now, I'm using acts_as_tsearch which leverages PostgreSQL and performs a basic MATCH query. Though, it's not really pulling back good results(for example, if I search for "create a project" and "how do i create a project" exists as a query, it doesn't find it).
Can anyone share their experiences with full text search, anyone tried out Solr ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
IndexTank 是您最好的选择。它们最近被添加为 Heroku 插件。
我们最近尝试为 Heroku 应用程序运行我们自己的搜索,但这是不值得的,因为您必须担心该搜索框的稳定性和扩展性。最好选择像 IndexTank 这样的提供商。
IndexTank 还为 Reddit 和 Wordpress.com 提供支持,因此可以打赌它是可靠的。
IndexTank is your best bet. They were recently added as a Heroku add-on.
We recently tried to just run our own search for our Heroku app and it's just not worth it because you have to worry about stability and scaling of that search box. It's better to go with a provider, like IndexTank.
IndexTank also powers Reddit and Wordpress.com, so can bet it'll be reliable.
SOLR 工作得非常好——起步有点贵(每月 20 美元),但它确实有效,而且工作得很好。
他们最近添加了询问用户“您是否想搜索[正确的拼写]”的功能。
您可以轻松地进行跨模型搜索(搜索用户以及汽车和经销商)。
SOLR works very nicely -- it's a bit pricey to get starts ($20 a month), but it just works, and works well.
They recently added the ability to ask the user "Did you mean to search for [correct spelling]".
You can easily cross-model search (search for Users and Cars and Dealerships).
Heroku 提供了插件,您可以轻松地将其添加到您的应用程序中。您应该看看 Solr 和 IndexTank。
Heroku offers addons which you can easily add to your application. You should take a look at Solr and IndexTank.
Texticle gem 中有一个免费的解决方案。它使用 PostgreSQL (> 8.3) 全文索引支持并在模型上创建搜索方法。如果您创建索引,速度非常好(对于免费解决方案)。
希望有帮助!
There's a free solution in the Texticle gem. It uses PostgreSQL's (> 8.3) full text index support and creates a search method on your models. If you create indexes, the speed is very good (for a free solution).
Hope that helps!