MySQL full-text search in Rails?

When I added the search function to my first Rails application, I used Sphinx after reading that using MySQL built-in full-text search was a bad idea. Although Sphinx works well, it's a little tricky to configure, and I feel that there are too many overloads for the simple search function required in my application.

Searches are not performed very often on my site (no more than one search every 3-4 seconds), so I'm not too worried about loading.

My question is: why is using fulltext search in MySQL a bad idea compared to Sphinx / Ferret / Solr / etc ..?

+3
source share
1 answer

MySQL is a relational database, not a search engine so soon, we are talking about using something that was not specifically created for this task. However, MySQL full-text search works very well; however, this is not good if you need to scale.

  • You don’t want your database server to do more than it needs, as this is usually the application’s bottleneck even without some kind of full-text search.
  • MySQL full-text searches require you to use the MyISAM engine, which is a problem if you need consistency in your data.
  • MyISAM does not support many advanced data verification tools supported by engines such as InnoDB, so you are generally at a disadvantage starting with MyISAM.

, YMMV, , MyISAM, . , MOST ( , ).

+4

Source: https://habr.com/ru/post/1733707/


All Articles