Full text Search in MySQL database



Full text Search in MySQL database

Full text Search in MySQL database

In this tutorial we are going to implement a complex text search in database. We will use FULLTEXT index to perform much complex search operations unlike “`LIKE“` as used.

To start:
Start your MySQL server and log in with the username and password like this command in terminal.
“`mysql -u username -p “`
Then enter the password when prompted. As shown in the video create a table called post and three columns (id, title and description) and we are going to search in the description column. Insert some test data at least four rows then to create an index use this query:
“`ALTER TABLE post ADD FULLTEXT(description);“`
replace the description with the column that you are going to implement a full text search. In order to search use query like this:
“`SELECT * FROM post WHERE MATCH(description) AGAINST(“text_to_search”);“`
From the above video we learnt how to implement a fulltext search. You can find the next tutorial on how to implement a relationship between the two columns in a table.

How to generate Credentials for Google APIs call. https://youtu.be/WahkiQgtMuk
How to download source code from my video tutorials https://youtu.be/ssJeOxj9a14
Upgrade Microsoft Office in lest than 5 seconds https://youtu.be/lnSuND6j6dw