Search code examples
mysqlsqlmatch-against

Sql compare almost equal records


I have such records in db:

Тормозной диск

and

Диски тормозные LPR

etc

and i try to compare

Тормозной диск

with

Диски тормозные LPR

here

select * from (....) where match(`cross_value`) against ("*Тормозной диск*" in boolean mode)

Sure it give me that it doesn't include it...

But how can i tell mysql, that it is true? That Диски Тормозные and Тормозной Диск is the same and inclusion => true?


Solution

  • If order doesn't matter, include your terms as mandatory:

    select * from (....)
    where match(`cross_value`) against ('+Тормозн* +диск*' in boolean mode)