I created a full text index using the SQL Server Full Text wizard but when I pass in a search term it doesn't ignore stopwords.
i.e. This returns rows:
SELECT *
FROM dbo.T_Restaurant AS Restaurant
JOIN dbo.SearchView AS SearchView ON SearchView.id = Restaurant.id
WHERE CONTAINS(SearchView.TotalSearchField, ' indian & bridgwater ')
But this doesn't:
SELECT *
FROM dbo.T_Restaurant AS Restaurant
JOIN dbo.SearchView AS SearchView ON SearchView.id = Restaurant.id
WHERE CONTAINS(SearchView.TotalSearchField, ' indian & in & bridgwater ')
I know that 'in' is a stopword in the English language and yet it doesn't appear to be ignored. The index is using the System stopword list according to its properties. Have I missed a step to set the stopword list up?
Many thanks,
Chris.
Does this FTS syntax work better? I think it will have taken indian & bridgewater to be a phrase rather than looking for the words which is what I think you are trying to do.
SELECT *
FROM dbo.T_Restaurant AS Restaurant
JOIN dbo.SearchView AS SearchView ON SearchView.id = Restaurant.id
WHERE CONTAINS(SearchView.TotalSearchField, '"indian" AND "bridgwater"')
SELECT *
FROM dbo.T_Restaurant AS Restaurant
JOIN dbo.SearchView AS SearchView ON SearchView.id = Restaurant.id
WHERE CONTAINS(SearchView.TotalSearchField, '"indian" AND "IN" AND "bridgwater"')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With