How do I do full-text searching in Ruby on Rails?

前端 未结 8 1923
忘了有多久
忘了有多久 2020-12-02 19:39

I would like to do full-text searching of data in my Ruby on Rails application. What options exist?

相关标签:
8条回答
  • 2020-12-02 20:16

    It depends on what database you are using. I would recommend using Solr as it offers up a lot of nice options. The downside is you have to run a separate process for it. I have used Ferret as well, but found it to be less stable in terms of multi-threaded access to the index. I haven't tried Sphinx because it only works with MySQL and Postgres.

    0 讨论(0)
  • 2020-12-02 20:16

    I would recommend acts_as_ferret as I am using it for Scrumpad project at work. The indexing can be done as a separate process which ensures that while re-indexing we can still use our application. This can reduce the downtime of website. Also the searching is much faster. You can search through multiple model at a time and have your results sorted out by the fields you prefer.

    0 讨论(0)
提交回复
热议问题