MySQL Forums
Forum List  »  Full-Text Search

New is not counted as a word
Posted by: Naresh Bhagtani
Date: March 17, 2010 12:22PM

Hello

I found out that MySQL FULL text search in Boolean Mode, does not count "new" as a word. I simply can't seem to get a result if my search term is "new". I tried this query for a database of properties in New York/ New Jersey

SELECT property_address,
MATCH (property_address)
AGAINST ('new*' IN BOOLEAN MODE)
as score
FROM properties_master WHERE
MATCH (property_address)
AGAINST ('new*'
IN BOOLEAN MODE)
ORDER BY score DESC

There were absolutely no results. Whereas atleast 300 properties have the word New York in their address field. Then I tried something slightly different to prove my point.

SELECT property_address,
MATCH (property_address)
AGAINST ('new* york*' IN BOOLEAN MODE)
as score
FROM properties_master WHERE
MATCH (property_address)
AGAINST ('new* york*'
IN BOOLEAN MODE)
ORDER BY score DESC

This time I got results. But when I checked the score, each record had a score of just 1. The boolean search clocked only York as the matching search term.

Has anyone out there noticed this? It seems new may be a reserved word! Any ideas how to get around this?

Thanks
Naresh

Options: ReplyQuote


Subject
Views
Written By
Posted
New is not counted as a word
3820
March 17, 2010 12:22PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.