I want to do full text search efficiently in MYSQL using match against. Specially I need to use binary operators(eg. match some text but not other text). However I also need efficient transaction support.
But full text search is only supported on MYISAM, not Innodb. What to do?
views:
47answers:
3Assuming you need to use Innodb.
I'd suggest using an external search tool - sphinx or solr would get my vote. Both of them consistently return better results than mysql fulltext search, and much faster. I'd say sphinx is easier to get up and going with, especially coming from mysql.
If you can't install either of them, or just don't have time, at a push, you could either move or duplicate just the necessary fields in a myisam table so that you can use mysql's fulltext search.
This is a suggestion rather than answer.
If you're going to have a large database or want advanced features, don't use mysql's full-text search. You can use sphinx or lucene.
SPhinx is generally faster and lighter, but Lucene has much more features. I personally use Sphinx.
You can also try Ferret it is a ruby-implementation of an apache searching library. According to speed tests, it is also much faster.