在 Ruby on Rails 中搜索的最佳选择是什么? [英] What's the best option for searching in Ruby on Rails?

查看:45
本文介绍了在 Ruby on Rails 中搜索的最佳选择是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有几个插件选项可用于在您的 Ruby on Rails 应用程序中构建搜索引擎.以下哪个最好?

There are several plugin options for building a search engine into your Ruby on Rails application. Which of these is the best?

推荐答案

Thinking Sphinx 有更简洁的语法来定义哪些字段和哪些模型被索引.

Thinking Sphinx has more concise syntax to define which fields and which models are indexed.

UltraSphinx 和 Thinking Sphinx(最近)都具有超酷功能,该功能考虑了对象的地理邻近性.

Both UltraSphinx and Thinking Sphinx (recently) have ultra-cool feature which takes into account geographical proximity of objects.

UltraSphinx 在加载模型方面存在令人讨厌的问题(它不会加载整个 Rails 堆栈,因此您可能会遇到奇怪且难以诊断的错误,这些错误是通过添加显式 require 语句来处理的).

UltraSphinx has annoying problems with how it loads models (it does not load entire Rails stack, so you could get strange and hard to diagnose errors, which are handled by adding explicit require statements).

我们在新项目中使用 Thinking Sphinx,在使用地理内容的项目中使用 UltraSphinx.

We use Thinking Sphinx on new projects, and UltraSphinx on projects which use geo content.

这篇关于在 Ruby on Rails 中搜索的最佳选择是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆