views:

465

answers:

1

I'm trying to use ContainsTable to return a ranked list of results.

I have it working fine when it finds a whole word match but its doesnt seem to work for partial words. For example if I search for 'acq' it wont find 'Acquisitions'. I really need it to work with partial matches for it to be useful. Using "Like" is not an option as the results need to be weighted.

SELECT
    TitleRanks.RANK,
    CourseId,
    CourseTitle   
FROM
    TBL_LMS_CLIENT_COURSES as Courses
    INNER JOIN CONTAINSTABLE(Courses,CourseTitle,'acq') AS TitleRanks 
        ON Courses.CourseId = TitleRanks.[key]

Any ideas would be great.

Thanks

+1  A: 

Does the scenario prevent you using a prefix term in the contains clause?

 INNER JOIN CONTAINSTABLE(Courses,CourseTitle,'"acq*"')
Andrew
Thats one option, I would rather a solution that looked at each word and did a contains but it sounds like thats outside the scope of freetext and would be cumbersome to implement.
Gavin Draper