Fulltext index top 10000 hits

  • Hi there,

    Is there a way of setting the Full text index to get the top 10,000 hits only?

    I have created a Full text index on "html content of movie reviews page from different websites. I am looking for certain keywords and want only top 10,000 hits. How can I do that?

    This is the code I have:

    Declare @SearchTerm varchar(1000)

    DECLARE Cur CURSOR LOCAL FAST_FORWARD FOR

    SELECT SearchTerm

    FROM dbo.MasterSearchTerms (nolock)

    --example of Searchterm ISABOUT("kid friendly" weight(.1)) OR ISABOUT("rude humor" weight(.2))

    OPEN Cur

    FETCH NEXT FROM Cur INTO @SearchTerm

    WHILE @@FETCH_STATUS = 0

    BEGIN

    SELECT mvfti.RANK,mvfti.key,HTMLReviews

    FROM [MovieReviews].dbo.Reviews

    INNER JOIN

    CONTAINSTABLE([MovieReviews].dbo.Reviews, HTMLReviews, @SearchTerm ,LANGUAGE N'English')) as mvfti

    ON mvfti.=A.id

    FETCH NEXT FROM cur INTO @SearchTerm

    END

    CLOSE Cur

    DEALLOCATE Cur

    Thanks

    MR

  • closing this post myself as I figured out the answer.

    If anybody has the same issue,

    There is a parameter in CONTAINSTABLE that can be set.

    CONTAINSTABLE([MovieReviews].dbo.Reviews, HTMLReviews, @SearchTerm ,LANGUAGE N'English',10000))

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply