I need to customize Full-text search for Persian language. And customize Stop/Noise words and synonyms for this language.
My SQL Server version is 2016 and full-text search is installed.
For use Persian language in SQL Server Stop list, Full text catalog and etc just we should use Neutral
. If you don't use Neutral
in catalog I suggested for you change it to Neutral
, sometimes this is empty like below:
Your problem solve by this query for any language:
--View Stoplist word
SELECT w.stoplist_id,
l.name,
w.stopword,
w.language
FROM sys.fulltext_stopwords AS w
INNER JOIN sys.fulltext_stoplists AS l
ON w.stoplist_id = l.stoplist_id;
-- Stopwords list
CREATE FULLTEXT STOPLIST StopListCustome;
GO
-- Add a stopword
ALTER FULLTEXT STOPLIST StopListCustome
ADD 'SQL' LANGUAGE 'English';
GO
ALTER FULLTEXT STOPLIST StopListCustome
ADD 'از' LANGUAGE 'Neutral';
Find this document and code on github
And also you can use below lists for add any stop list text in Persian and English :
Download Persian or Farsi stoplist for many words
Download Persian or Farsi stoplist for standard words