I think I'm missing something simple here...
For example, given the word absolutely
, return rows
absolute
absol
ab
absolutely
I tried CONTAINS
SELECT word
FROM [dbo].[SentimentModel1]
WHERE contains(search,'absolutely')
I think I'm missing something simple here...
For example, given the word absolutely
, return rows
absolute
absol
ab
absolutely
I tried CONTAINS
SELECT word
FROM [dbo].[SentimentModel1]
WHERE contains(search,'absolutely')
What you are looking for is:
SELECT word FROM [dbo].[SentimentModel1] WHERE word LIKE '%absol%'
You should use the smaller part you want. That should generalize in some form. A better way to do it is to use soundex:
SELECT word FROM [dbo].[SentimentModel1] WHERE SOUNDEX(word) = SOUNDEX('absol')
OR
SELECT word FROM [dbo].[SentimentModel1] WHERE SOUNDEX(word) = SOUNDEX('absolutely')
Another way you can do it is to split the word into characters: T-SQL Split Word into characters After that all you need is to search the combination of characters.
the index position 0,
index position 0+1,
0+1+2,
etc...
For better performance you could add all the searches to a temporary table and index it. Full text search could be also helpful...