Search in Rails

后端 未结 3 541

I have a table of \"posts\" with attributes that include title and body.

posts_controller.rb:

class PostsController < A         


        
3条回答
  •  忘掉有多难
    2020-12-07 17:28

    Although this is not a direct answer to your question, here are some resources that may help you as you are learning about search and getting it implemented in your Rails app.

    A Simple search form

    Advanced search form

    Searching with AJAX

    Powerful search functionality with the Sunspot gem

    List of the most popular search tools for Ruby

    ---------------UPDATE----------------

    Elasticsearch has been growing in popularity due to some modern awesomeness that it has, such as instant indexing. It has a ruby gem named tire. Definitely worth a look.

    Elasticsearch

    Tire

    ---------------UPDATE 2----------------

    Tire has been retired, and has been replaced by Elasticsearch-ruby

提交回复
热议问题