Hi all,I am quite a newbie to SQL in general. Although I can find my way around it I have just begun Fulltext Searching and as I am finding out it's a whole new beast to conquer. I am currently in a process of making a site that should search through the Title, Description and the Tag columns of media (Images and Videos) table a return the best possible results that match. The thing is that the end user may input many keywords in the field for example they may search for "Britney Spears Music Video Circus" The site it self is made using ASP.NET and I do have the ability of manipulating the query string before sending it to the server as a parameter. I currently have the following to accomplish this but it is now adequate as it does not search all possibilities.Table structure:id - int - identity - PKOwnerID - intMediaTitle - nvarchar(100)MediaFileName - nvarchar(100)MediaDesc - nvarchar(MAX)MediaTags - nvarchar(MAX)MediaVoteCount - intMediaVoteSum - intIsVideo - bitIsImage - bitDateAdded - datetimeDateModified - datetimeAllowed - bitIsPublic - bitviewCount - intDurationSec - nvarchar(50)Duration - nvarchar(50)SELECT MediaList.id, UserProfile.UserName, MediaList.MediaTitle, MediaList.MediaFileName, MediaList.MediaDesc, MediaList.MediaTags, MediaList.MediaVoteCount, MediaList.MediaVoteSum, MediaList.DateAdded, MediaList.Allowed, MediaList.DurationSec, MediaList.Duration, MediaList.viewCount, ftt.RANKFROM [C265491_Neda].[C265491_Neda1].[MediaList] INNER JOIN [C265491_Neda].[C265491_Neda1].[UserProfile] ON MediaList.OwnerID = UserProfile.id INNER JOINCONTAINSTABLE ([C265491_Neda].[C265491_Neda1].[MediaList], * , @SearchQuery) as ftt ON ftt.[KEY] = MediaList.idWHERE MediaList.Allowed = 1 AND MediaList.IsPublic = 1ORDER BY ftt.RANK DESC
The @SearchQuery is compiled on the server side using C#.NET and can take on any form :) Currently I have it compiling '"Keyword1" OR "Keyword2" OR ....' for as many words there are in the Search Field.I really really appreciate any help.Thank you greatly in advance,Jason