Let's say I have the following text somewhere in a document stored in an FT indexed table in SQL Server
minsitry of education and science
I want the query to ensure the words are NEAR, but the query won't contain the exact words (instead I would like to use wildcars) – something like
CONTAINS(FileContent, 'NEAR(minist*, educ*, 10, TRUE)')
If I try this query, no results will be returned as NEAR seems to work only with exact words.
My question – is there a way to complete a search like this using SQL Server queries?
Best Answer
Have you tried CONTAINSTABLE? This includes a Rank column so will give you more visibility of the ranking process. This worked for me:
Update: found the following paragraph in the book Pro Full-Text Search in SQL Server 2008 by Michael Coles with Hilary Cotter
Ch3, p67