Full Text Search - Don't Stop StopWords

I created the full text index using the SQL Server full text wizard, but when I went through the search query, it did not ignore the stop words.

i.e. This returns the lines:

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 is not so:

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 word in English, but it does not seem to be ignored. The index uses the list of system stops according to its properties. Did I skip the step to set the diary list?

Many thanks,

Chris.

+3
source share
1 answer

Is the FTS syntax improved? I think that would make Indian and Bridgewater a phrase rather than a search for the words that 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"')
+1
source

Source: https://habr.com/ru/post/1784274/


All Articles