Avatar of visionari
visionari
 asked on

Mysql match() againts() giving some problems to me?

Hello, I have a litle query that I am using to search inside a database, I have a fulltext index for the fields "titulo & descripcion", and the query works... the problem comes when I put something that doesn't exist in the database (like the search I have in the query "280394829038402938409283403409240240849") this shouldn't give results but the problem is that it keeps giving me results... is there something I am doing wrong?

Thank's

SELECT * , MATCH(titulo, descripcion) AGAINST ('280394829038402938409283403409240240849') as coincidencia from preguntas order by coincidencia DESC
MySQL ServerDatabases

Avatar of undefined
Last Comment
visionari

8/22/2022 - Mon
Terry Woods

The match relevance is returned as a positive floating point number, or 0 for no similarity. It must be deciding there is a small similarity somehow! Try this:

SELECT * , MATCH(titulo, descripcion) AGAINST ('280394829038402938409283403409240240849'  IN BOOLEAN MODE) as coincidencia from preguntas order by coincidencia DESC
visionari

ASKER
mmh, not really working for me, all I get is 0 in coincidencia even in keywords that exist...
ASKER CERTIFIED SOLUTION
Guy Hengel [angelIII / a3]

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
visionari

ASKER
Thank's!
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck