I am looking for advice on how to approach an upcoming project I am due to undertake. The reason I am asking is that I'm just out of college and the company I work for is currently searching for a new lead developer which makes things a little harder on me as I've got no guidance and really need some help deciding the best way to go about this.

Basically, we have a client who for the past 5 - 6 years has been using a MySQL database to drive their website. Thought the database is not that large (1.8GB) it has many tables and it is clear that whoever developed it initially did not really put a lot of thought into the structure, thus making it very difficult to maintain and improve.

Up until now the Search functionality of the site has been handled by constructing the sql to search across the entire database with the specified keywords. The client wishes to rewrite this functionality and I am looking for the best way to do so. Would I be better writing the code from scratch and piecing it together? Or is there a library that provides an easy way to index a mysql database?

The client also has a large number of filters they wish to incorporate in the search and also wish to include auto complete functionality.

I'm literally at a loss as I've no experience whatsoever with these sort of things and would really appreciate any advice on how more experienced php developers would approach this issue?

I have looked into Elastic Search and elastica but I am having trouble installing it into the project and even at that I am not entirely sure it is the best way to go as Elastic search is nosql....

Any advice is much appreciated?

  • Have you considered either MySQL's full text search or the SphinxSE? – Vérace Oct 21 '14 at 10:25
  • @Vérace I did not consider MySQL's full text search, is that a way of implementing the auto complete functionality? – Javacadabra Oct 21 '14 at 11:40
  • No - the concept of autocomplete is not a database concept - it is a programming one. Obviously, you'll need search for autocomplete - take a look here and here (results of Googling "php sphinxse autocomplete" - there are other results). Also, see here. – Vérace Oct 21 '14 at 11:54
  • Have you implement a search approach? If you implement then please add an answer. I am also looking that types of answer. – Md. Sajedul Karim May 23 '16 at 18:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.