SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


plural form of search string with CONTAINS in full text search


plural form of search string with CONTAINS in full text search

Author
Message
sql server developer
sql server developer
Old Hand
Old Hand (368 reputation)Old Hand (368 reputation)Old Hand (368 reputation)Old Hand (368 reputation)Old Hand (368 reputation)Old Hand (368 reputation)Old Hand (368 reputation)Old Hand (368 reputation)

Group: General Forum Members
Points: 368 Visits: 472
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' )
Steven Willis
Steven Willis
SSC Eights!
SSC Eights! (827 reputation)SSC Eights! (827 reputation)SSC Eights! (827 reputation)SSC Eights! (827 reputation)SSC Eights! (827 reputation)SSC Eights! (827 reputation)SSC Eights! (827 reputation)SSC Eights! (827 reputation)

Group: General Forum Members
Points: 827 Visits: 1721
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

 
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search