I would like SQL Server to search a phrase "centos 8" for example. The exact match.
But since number "8" is considered a stop word, it only searches for "centos".
Even if I use quotes
select [KEY] FROM CONTAINSTABLE(myTable, myColumn, '"centos 8"')
How can I make it search for a phrase without disabling the stop words feature completely? (very useful in other cases)
Best Answer
You don't need to disable the
STOPWORDS
/STOPLIST
feature completely, rather you can just remove that specific word "8" from it if you want the search to always be able to match it.Microsoft's Docs ALTER FULLTEXT STOPLIST explain how to remove words from the default
STOPLIST
. And for general information on managingSTOPLISTS
you can read there docs Configure and Manage Stopwords and Stoplists for Full-Text Search as well.