Search mysql database using php
I want to implement a powerful search engine for my ecommerce application. im usi开发者_开发技巧ng php and mysql as database. Can anyone guide me how to proceed? Is the FULL TEXT feature of MYSQL good for a large volume of data? Thanks!
IMHO, the MySQL Full text engine is a really poor choice.
Firstly, the number of parameters to tweak the search is almost 0.
Secondly, from my experiencem it doesn't scale.
You might consider using
- Sphinx
- Lucene
Lucene is said to be the industry standard project. They have solr if you want to have a separate architecture.
They are far more advanced and perform better.
This should get you started, however you will have to modify or expand on the idea.
For the second part of your question, have a look at:
Pros & Cons of Full Text Search
Recently, for an app handling a huge amount of data, we have given up both MySQL FULL TEXT and Lucene to switch on PostgreSQL which has a much more powerful native FULL TEXT engine. At least, it was what the results of our investigations said.
Take a look at the Zend_Lucene from Zend_Framework and a new feature for mysql full text search here
精彩评论