我需要为波斯语自定义全文搜索。并为此语言自定义停止/干扰词和同义词。
我的SQL Server版本是2016,安装了全文搜索。
最佳答案
要在 SQL Server 停止列表、全文目录等中使用波斯语,我们应该使用 Neutral
.如果您不使用 Neutral
在目录中我建议你把它改成 Neutral
,有时这是空的,如下所示:
您可以通过此查询解决任何语言的问题:
--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';
您可以使用以下列表添加任何波斯语和英语停止列表文本:Download Persian or Farsi stoplist for many words
Download Persian or Farsi stoplist for standard words
关于sql - 波斯语全文索引停止列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60293825/