MySQL fulltext search functions are nice..:)



MySQL fulltext search functions are nice..:)

MySQL fulltext search functions are nice..:)

In this sql tutorial I’ll explain a couple of mysql fulltext search functions.
In MySQL, fulltext searches are possible with the use of a full-text search index.

SQL queries using a fulltext index can be of these types:

1) IN NATURAL LANGUAGE MODE [WITH QUERY EXPANSION] – this modifier makes your MySQL server interpret the SQL query normally.
2) IN BOOLEAN MODE [WITH QUERY EXPANSION] – this modifier makes your MySQL server interpret your SQL query with certain characters bearing a special meaning. These characters include the following:

“+” means “includes”
“-” means “excludes”
” ” (nothing) means OR
“@” means “certain distance”
Arrows to the left and to the right change the significance of the phrase
“*” is a wildcard
“( )” mean subexpressions

Make good use of fulltext sql queries in mysql server and other database management systems!

A fulltext sql query looks like so:
SELECT * FROM table WHERE match(column) AGAINST([pattern] [modifier]); where the modifier is the type.

Be advised, though, that in older versions of MySQL server a query involving an “@” sign and the boolean mode will crash the server (that’s a bug within MySQL.)

Fulltext search modes only work with fulltext sql indexes, so to add a sql index, use a query like so:
ALTER TABLE demo_table ADD FULLTEXT INDEX ft_idx(column); where “ft_idx” is the name of your fulltext index.

Enjoy the video!

Music:
I Just Like You by Di Young: https://www.youtube.com/watch?v=TiC7_167hQ0&t=0s
Licensed under a Creative Commons Attribution license: https://creativecommons.org/licenses/by/3.0/
Free Download / Stream: https://bit.ly/3J0rUYV
Music promoted by Audio Library: https://www.youtube.com/watch?v=9BD0MjTbA7k

#database #mysql #web #webdevelopment #reels #shorts #software