plural form of search string with CONTAINS in full text search

  • I'm using CONTAINS to search for a string or word. If I search for Hobby is it possible to make it search for Hobbies also, which is the plural of Hobby? FREETEXT seems to be doing this but I want to do it with CONTAINS because it will make me search with an AND clause. FREETEXT using OR clause which I don't need.

    For example if I do below search for 'John AND Hobby', I would like to get strings that have both John and Hobby / Hobbies

    WHERE contains (*, 'John AND Hobby' )

  • sql server developer (7/26/2013)


    I'm using CONTAINS to search for a string or word. If I search for Hobby is it possible to make it search for Hobbies also, which is the plural of Hobby? FREETEXT seems to be doing this but I want to do it with CONTAINS because it will make me search with an AND clause. FREETEXT using OR clause which I don't need.

    For example if I do below search for 'John AND Hobby', I would like to get strings that have both John and Hobby / Hobbies

    WHERE contains (*, 'John AND Hobby' )

    You need to use CONTAINSTABLE to do proximity searching. Once the query is set up correctly with CONTAINSTABLE it will return the results with a column showing the ranking of the search results. There are many options for setting the various proximity variables.

    CONTAINSTABLE

     

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

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