HGeneAnthony Posted March 28, 2007 Share Posted March 28, 2007 I'm using a full text search for keywords. From what I gathered full text search needs all items to be in their own field in order for me to write something like +linux -windows. Without linux and windows being in their own field it won't work right. What I'd like to do is be able to take the results and find out which keywords had hits and how many. For example, if I searched on Linux and opensource was a common keyword among the results I'd like to find out how many times it came up. The problem is since one record might have opensource as the third keyword given and another record might have it as the second given they'd be in seperate fields. So I was wondering is there a way I can group the fields together and make this work. Quote Link to comment Share on other sites More sharing options...
Vikas Jayna Posted March 30, 2007 Share Posted March 30, 2007 Create a composite fulltext index rather than separate ones for each field. create the index like this:- alter table xyz add fulltext index abc (FIELD1,FIELD2,FIELD3); Query the table like this:- select * from xyz where match(FIELD1,FIELD2,FIELD3) against ('+linux -windows'); 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.