Spring Boot Full Text Search with MySQL Database Example

preview_player
Показать описание
Learn how to use full text search in MySQL and code full-text search function for a Spring Boot web application based on Spring Data JPA, Hibernate, Thymeleaf and Bootstrap.

What you will learn in details:
- Why Full Text Search
- How to Create Full Text Index and execute Full Text Search query in MySQL
- How to Implement full text search function in Spring Boot web application
- The Pros & Cons of Full Text search with MySQL database.

#springboot #mysql #search #java #springframework
Рекомендации по теме
Комментарии
Автор

This was very helpful, thank you for creating this content. I have question you set it doesn't work well with complex entity relations would I be able to use full search text in a situation where I need to compare e.g. the color of the product against a table which is joined with the product table. e.g.
select *
from Product a
inner join
productItem b on (a.productId=b.productId)
inner join
ProductColor c on
where
a.about like '%Plain-woven Navy%'
OR
c.colorName like '%Plain-woven Navy%';

I have one keyword and want it to match on the color as well to get more refined results, exact match doesn't return any off-course and I have to do the exact match in tricky way by splitting the string and its still not as good as your example. would you give me an idea on how to handle this. would it be something like this or is it not possible to do.note adding c.colorname to the column list
select *
from Product a
inner join
productItem b on (a.productId=b.productId)
inner join
ProductColor c on
where
MATCH (a.productName, a.productDescription, a.about, c.colorname)
AGAINST ('Plain-woven Navy');

houseofmalik
Автор

Hi, I get an error when I use @Query with the match function

public interface ProductRepo extends JpaRepository<Product, Integer>
{
@Query(value = "SELECT * from Product where match (productName, productDescription, about) AGAINST (?1)", nativeQuery = true)
Product findProductBYMatch(String keyword);


Get this error
Error: MySQL: no viable alternative at input 'SELECT * from Product where match (' [SQL_SYNTAX]

I'm using eclipse, any idea on how I can resolve this issue. do I need to get any plugin or use specific library to make this work.

houseofmalik
Автор

helpful video, Can I use FUll TEXT in H2 database

learnprogramming
Автор

Hi sir I want to perform generic search operation on my db there are 1200 tables are there in my db how to create a query for this?

althafshaik
Автор

Hi Nama, if possible can you make one video on how to create category and it's sub category and it's child category. And also how to retrieve the category associated sub categories and it's associated child categories..really I need it Nama.

sagarsri
Автор

hi i do it but i have a exception is Cannot convert string '\xAC\xED\x00\x05~r...' from binary to utf8mb4

leotran
join shbcf.ru