mysql - 使用 PostgreSQL 进行全文搜索是否需要 thinking-sphinx?

标签 mysql ruby-on-rails-3 postgresql thinking-sphinx

我在 Rails 3 应用程序中使用了 thinking-sphinx(和 Heroku 上的 flying-sphinx)和 mySQL。现在我迁移到 PostgreSQL,我想知道:

  • 我需要 thinking-sphinx 还是我可以在 PostgreSQL 上实现所有 thinking-sphinx 功能?

  • 有哪些 thinking-sphinx 可以做而我使用 PostgreSQL 做不到的事情,因为后者也支持全文搜索?

最佳答案

PostgreSQL 确实支持全文搜索索引,但 Sphinx 更快。它已经有几年历史了,但您可以查看我的演示文稿 Full Text Search In PostgreSQL我在其中比较了几种解决方案。

使用 PostgreSQL FTS 的优势:

  • 它是内置的,无需运行其他技术。
  • 索引自动与您的数据同步,无需定期向索引导入数据。
  • 更容易支持增量更新。

使用 Sphinx 搜索的优势:

  • 更好的底线查询性能。
  • 更容易理解索引。
  • 从 RDBMS 卸载搜索流量,因此理论上您可以更轻松地扩展。

关于mysql - 使用 PostgreSQL 进行全文搜索是否需要 thinking-sphinx?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14899716/

相关文章:

python - 如何在python中将变量插入mysql

Jquery ajax 和 Rails 3 -> 加载内容

ruby-on-rails - Rails db 数据在重新部署到 Heroku 时会丢失吗?

database - 如何设计大型数据库、实体-关系模型

php - 原始查询适用于 phpmyadmin 但不适用于 laravel

mysql - SequelizeEagerLoadingError : product is not associated to collection

php - 在 Magento 数据库迁移中保留 ID 列

ruby-on-rails-3 - 用于私有(private)存储库的 Travis CI

jquery - "Ajax is not found"异常 - Rails 是否错误地默认为 Prototype?

postgresql - 在数组中查找多个值的最佳方法