MySQL Forums
Forum List  »  Full-Text Search

search for email addresses in boolean mode
Posted by: Katrin Moeller
Date: May 10, 2006 07:16AM

Hi,

why the heck is that: I need to search for email addresses through the fulltext search but I'm getting far too many hits.

This is how I create and fill my test table:
CREATE TABLE `search_test` (
`email` varchar(255) NOT NULL default '',
FULLTEXT KEY `index_1` (`email`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO search_test value("rudi.voeller@dfb.de");
INSERT INTO search_test value("rudi-voeller@dfb.de");
INSERT INTO search_test value("rudi---voeller@dfb.de");
INSERT INTO search_test value("rudi-ABC-voeller@dfb.de");
INSERT INTO search_test value("rudi_voeller@dfb.de");
INSERT INTO search_test value("rudi+voeller@dfb.de");
INSERT INTO search_test value("rudi(---)voeller@dfb.de");
INSERT INTO search_test value("rudi-A-voeller@dfb.de");
INSERT INTO search_test value("rudi>voeller@dfb.de");
INSERT INTO search_test value("rudi>>>>voeller@dfb.de");
INSERT INTO search_test value("rudi~~~voeller@dfb.de");
INSERT INTO search_test value("rudiavoeller@dfb.de");
INSERT INTO search_test value("rudi.voeller@dfb.de");

And this is my search query:
SELECT * FROM search_test WHERE MATCH (email) AGAINST ('"rudi.voeller@dfb.de"' IN BOOLEAN MODE);

Which gives me plenty of results:
+-------------------------+
| email |
+-------------------------+
| rudi.voeller@dfb.de |
| rudi-voeller@dfb.de |
| rudi---voeller@dfb.de |
| rudi+voeller@dfb.de |
| rudi(---)voeller@dfb.de |
| rudi>voeller@dfb.de |
| rudi>>>>voeller@dfb.de |
| rudi~~~voeller@dfb.de |
+-------------------------+

I would only expect the first line to be returned. Why am I getting the others as well? Has it something to do with the boolean mode? Or stopwords? Or the ft_boolean_syntax variable?

Thanks in advance for your replies,
Katrin

Options: ReplyQuote


Subject
Views
Written By
Posted
search for email addresses in boolean mode
5925
May 10, 2006 07:16AM


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.