Re: why does MATCH/AGAINST fail to catch entries that LIKE does catch?
- From: Erwin Moller <since_humans_read_this_I_am_spammed_too_much@xxxxxxxxxxxxxxxx>
- Date: Tue, 19 Jun 2007 10:39:36 +0200
lawrence k wrote:
Wierd. Go to this page:
http://www.ihanuman.com/search.php
and search for "yoga"
This query gets run:
SELECT * FROM albums WHERE MATCH(name,description) AGAINST ('yoga')
ORDER BY id DESC
it returns nothing. (other searches work, but not the one for
"yoga").
But if I do SELECT * FROM albums WHERE description LIKE '%yoga%'
then I get 5 matches
What the hell??
Hi,
You are talking about MySQL I guess.
My knowledge of MySQL is limitted, but I think I can answer your question
based on TSEARCH2 as found in Postgresql.
Maybe it helps.
When you use 'match against' you are performing a full text search, which is
conceptually something different than LIKE '%yoga%'.
eg:
holayogatralala will match with: LIKE '%yoga%'
but not in match against.
FULL TEXT INDEXING is using whole words (or derivates) from a word.
This process is called 'stemming'.
eg: 'use' , 'used', and 'using' can all be stemmed to 'use'.
I *think* 'use' is called lexicon in this context, not 100% sure though..
Hope that helps.
Regards,
Erwin Moller
.
- References:
- why does MATCH/AGAINST fail to catch entries that LIKE does catch?
- From: lawrence k
- why does MATCH/AGAINST fail to catch entries that LIKE does catch?
- Prev by Date: Re: why does MATCH/AGAINST fail to catch entries that LIKE does catch?
- Next by Date: Re: problem with functions and paths
- Previous by thread: Re: why does MATCH/AGAINST fail to catch entries that LIKE does catch?
- Next by thread: Re: why does MATCH/AGAINST fail to catch entries that LIKE does catch?
- Index(es):
Relevant Pages
|