Lucene vs MySQL MyISAM
Now, we are using lucene to do search. However, compared with lucene, could we use Mysql开发者_如何学编程 MyISAM instead.
What are benefits to use them?
With the Lucene you will be able to create (only) a Full-Text index who will perform better with full-text queries compared. Keep in mind that it is only a Full-text search and not a fully featured DBMS.
Another search engine is Xapian, or wrapped into an application. I don't have personal experience with it, but from what I have heard it is perfect to search trough huge amounts of information.
Probably a bad idea to use MyIsam as you can't do foreign key relations within your index. It will also be slower than Lucene for searching text fields.
MyISAM FullText search is not the most configurable. Some changes require recompiling MySQL.
http://dev.mysql.com/doc/refman/5.5/en/fulltext-fine-tuning.html
It is also somewhat limited, especially if you want to FullText multiple fields (you can't say "field A has foo or field B has bar" within the fulltext query--you need a SQL OR). Another limitation is the fixed 50% threshold for natural language searches.
I would guess that Lucene's FullText is much faster, since Lucene was built to perform these searches. If your data is already in MySQL, you may want to try MyISAM. If you just want to search, go with Lucene. Lucene also will scale much easier than MySQL FullText.
精彩评论