I was hoping this part of my query would return rows with viral infection and viral infections. This isn't possible?
MATCH (keyword) AGAINST ('"viral infection*"' in boolean mode)
Thanks
| SitePoint Sponsor |




I was hoping this part of my query would return rows with viral infection and viral infections. This isn't possible?
MATCH (keyword) AGAINST ('"viral infection*"' in boolean mode)
Thanks
Convert your dollars into silver coins. www.convert2silver.com

Depending on what server you are querying:
Code:select * from table_name where column_name like '%viral infection%'
<?php//Kyle Wolfeecho devBlog("My Dev Notes");


there's a problem with LIKE and a leading wildcard, however...

<?php//Kyle Wolfeecho devBlog("My Dev Notes");


no, the problem is that LIKE with a leading wildcard cannot use a normal index (if one exists), and requires a table scan
whereas the fulltext index search should be close to instantaneous
the LIKE with a leading wildcard works the same as if i asked you to go to your white pages phone book and pull out all the last names with "sto" somewhere in them -- Astor, Caston, Johnstone, Winston -- so you have to read the entire book sequentially to find them all

Ah, performance wise absolutely. I suppose I could / should have brought that up.
<?php//Kyle Wolfeecho devBlog("My Dev Notes");




So with my query above, is there any way to return both viral infection as well as viral infections?
Thank you.
Convert your dollars into silver coins. www.convert2silver.com

<?php//Kyle Wolfeecho devBlog("My Dev Notes");




Yes, those work too. But the goal is to keep it in this boolean format:
MATCH (keyword) AGAINST ('"viral infection*"' in boolean mode)
Because sometimes I throw lots of other keywords in there like:
"viral infection", oregano, "immune system", ill*, wart*
Convert your dollars into silver coins. www.convert2silver.com

<?php//Kyle Wolfeecho devBlog("My Dev Notes");





It has to do with Boolean FULL TEXT searches:
http://dev.mysql.com/doc/refman/5.5/...t-boolean.html
Busboy, I believe your query should return both terms you are looking for the way it is now.

<?php//Kyle Wolfeecho devBlog("My Dev Notes");
Bookmarks