S
S
sbh2020-05-21 13:33:23
MySQL
sbh, 2020-05-21 13:33:23

How to search for a clear occurrence in full text search?

Used the search with like 'abc%'
There is a lot of data, the search now slows down.
I made an index in the table for full-text search, but when you search using full-text, the result is rows similar to those you are looking for but not suitable.
For example, I'm looking like this:
SELECT * FROM articles WHERE MATCH (title, body) AGAINST ('mail.ru');

as a result, the following will be displayed:
mail.ru
mail.ua
your.mail.ru
your.mail.ua

, etc.

I would like to use full-text search but have as a result of the query only what fits the search and does not look like it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Gordinskiy, 2020-05-21
@sbh

Try adding double quotes around your search phrase.

A phrase that is enclosed within double quote (") characters matches only rows that contain the phrase literally, as it was typed

doka

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question