beedie Posted September 1, 2008 Share Posted September 1, 2008 i have a query that works on two fulltext columns if only requesting one. If I query both in the same query I get Can't find FULLTEXT index matching the column list $query ="SELECT * FROM reviews WHERE MATCH(company,experience) AGAINST ('yeah')"; but this is fine $query ="SELECT * FROM reviews WHERE MATCH(company) AGAINST ('yeah')"; as is this: $query ="SELECT * FROM reviews WHERE MATCH(experience) AGAINST ('yeah')"; Both columns have fulltext FULLTEXT KEY `company` (`company`), FULLTEXT KEY `experience` (`experience`) What is wrong? Quote Link to comment Share on other sites More sharing options...
beedie Posted September 1, 2008 Author Share Posted September 1, 2008 When I added IN BOOLEAN MODE it worked. $query ="SELECT * FROM reviews WHERE MATCH (company,experience) AGAINST ('yeah' IN BOOLEAN MODE)"; Now I'd like to know why if any one knows? Quote Link to comment Share on other sites More sharing options...
fenway Posted September 2, 2008 Share Posted September 2, 2008 I'm confused... if you have it spanning two columns, you always need to refer to those. Quote Link to comment Share on other sites More sharing options...
beedie Posted September 2, 2008 Author Share Posted September 2, 2008 Fenway I'm not sure what is confusing you. I have two columns in the same table. The search only works when I do the query on each one on it's own (except when I add the IN BOOLEAN MODE) I thought I could do it without boolean mode for both columns in the same query. ?? Quote Link to comment Share on other sites More sharing options...
fenway Posted September 2, 2008 Share Posted September 2, 2008 The search only works when I do the query on each one on it's own (except when I add the IN BOOLEAN MODE) It shouldn't work -- you have 2 separate indexes, so it requires searches on each one independently. You're telling me you don't have an index that spans both columns? Maybe it combines them now? Which version? Quote Link to comment 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.