Click to See Complete Forum and Search --> : odd FULLTEXT searching


mojor
10-09-2007, 04:52 PM
MySQL version 4.1.22-standard

SELECT `url` FROM `links` WHERE MATCH (`url`) AGAINST ('http://en.wikipedia.org/wiki/Modernism')

will return:

http://en.wikipedia.org/wiki/Modernism
http://en.wikipedia.org/wiki/Elf
http://en.wikipedia.org/wiki/CBS
http://en.wikipedia.org/wiki/MGM
http://en.wikipedia.org/wiki/Samuel_Taylor_Colerid...
http://en.wikipedia.org/wiki/Gnome
http://en.wikipedia.org/wiki/The_Wonderful_Wizard_...
http://en.wikipedia.org/wiki/Dean_Koontz's_Franken...
http://en.wikipedia.org/wiki/George_MacDonald
http://en.wikipedia.org/wiki/Juan_Gris

... while I need only (http://en.wikipedia.org/wiki/Modernism).
If I go:

SELECT `url` FROM `links` WHERE MATCH (`url`) AGAINST ('http://en.wikipedia.org/wiki/Modernism') LIMIT 1

then yes it will return it. Yet again, if there is no (http://en.wikipedia.org/wiki/Modernism) in the database, then it will return the next similar match (http://en.wikipedia.org/wiki/MGM) while I need it to return "FALSE" as no entries found.
:confused:

cridley
10-18-2007, 10:51 AM
maybe I'm missing something but why not just look for the exact entry?

SELECT `url` FROM `links` WHERE `url` = 'http://en.wikipedia.org/wiki/Modernism'