tommyda Posted October 28, 2009 Share Posted October 28, 2009 I am building a search function using the following code: $results = mysql_query("SELECT * , MATCH(name,description,keywords,manufacturerid) AGAINST('+$search' IN BOOLEAN MODE) AS score FROM products WHERE MATCH(name,description,keywords,manufacturerid) AGAINST('+$search' IN BOOLEAN MODE) AND imageurl !='' ORDER BY score DESC")or die(mysql_error()); The problem I am having is that im getting more results when I search for the word "table" than I am for the plural "tables" I would preferably like to display both results for the plural and single variations of each keyword searched. I read on another forum that this can be solved using REGEXP but i have no idea how to implement it. Any help would be much appreciated. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/179366-plural-searching-with-match-against-regxp/ Share on other sites More sharing options...
fenway Posted October 31, 2009 Share Posted October 31, 2009 Well, you'll always get partial matches with fulltext searching... personally, I don't see anything wrong with that. Quote Link to comment https://forums.phpfreaks.com/topic/179366-plural-searching-with-match-against-regxp/#findComment-948408 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.