Link to home
Start Free TrialLog in
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
Avatar of Terry Woods
Terry Woods
Flag of New Zealand image

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
Avatar of visionari
visionari

ASKER

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

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank's!