Any solution or suggestions?
Feb 26, 2025
11
Level 8
Search like search engine.
How to Improve Search Results for "GCP" in MySQL Full-Text Search?
Hey everyone,
I'm facing an issue with search functionality in my project. When a user types "GCP" in the search field, I expect the following results:
- What is GCP?
- Advantages of GCP.
- Why we use Google Cloud Platform.
- Types of Google Cloud Platforms.
However, my search query only returns the first two results:
- What is GCP?
- Advantages of GCP.
Queries I Have Tried:
- Full-Text Search (Boolean Mode)
SELECT * FROM posts WHERE MATCH(title) AGAINST('gcp' IN BOOLEAN MODE); - Full-Text Search (Natural Language Mode)
SELECT * FROM posts WHERE MATCH(title) AGAINST('gcp' IN NATURAL LANGUAGE MODE); - Laravel Query Builder
Post::whereRaw("MATCH(title) AGAINST('gcp' IN BOOLEAN MODE)")->get(); - Algolia Search – Also did not return all four records.
Despite trying different approaches, some relevant results are missing. How can I ensure all four expected results appear when searching for "GCP"?
Any suggestions or improvements are highly appreciated!
Thanks in advance!
Please or to participate in this conversation.