Multiple word searching with Ruby, and MySQL

前端 未结 4 1519
被撕碎了的回忆
被撕碎了的回忆 2021-01-15 11:06

I\'m trying to accomplish a multiple word searching in a quotes database using Ruby, ActiveRecord, and MySQL. The way I did is shown bellow, and it is working, but I would l

4条回答
  •  感情败类
    2021-01-15 11:21

    Create a FULLTEXT index in MySQL. With that, you can leave string processing to MySQL.

    Example : http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html

提交回复
热议问题