2 ms·
Full text search in Postgres is fast if you have it configured correctly. > It is just my most recent of many experiences that MySQL 1) You're using MySQL not
by Lazare 9y ago
Full text search in Postgres is fast if you have it configured correctly.
> It is just my most recent of many experiences that MySQL
1) You're using MySQL not Postgres; given that this is a discussion about whether Postgres can compete with Elasticsearch, that's not super relevant. :)
> select * from `tweets` where `url` not like '%twitter.com%' and `url` like '%itunes.apple.com%'
2) That's not how you query a full text index; that's going to be glacially slow.
You need a FULLTEXT index and to use a MATCH...AGAINST query. Check out the docs[1].
[1]: https://dev.mysql.com/doc/refman/5.7/en/fulltext-search.html https://dev.mysql.com/doc/refman/5.7/en/fulltext-search.html
- firasd 9y agoFair enough, I wasn't aware of MATCH... AGAINST will have to check it out. But although I'm not going to keep going back and forth on this in HN comments it really has been my experience that Elasticsearch can do some very cool things that I've struggled to do with MySQL. I've already named the top three examples I have in mind (full text search, recommendations/related items, and trending topics i.e. finding terms used in text fields in the last week that weren't as frequently used in the last month.)
- wutwutwutwut 9y agoBut didn't you just say that you had not used full text search...you haven't struggled with FT - you haven't used it..