本文介绍了波斯语全文索引停止列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要自定义波斯语的全文本搜索.并为此语言自定义停止/杂音"单词和同义词.

I need to customize Full-text search for Persian language. And customize Stop/Noise words and synonyms for this language.

我的SQL Server版本是2016,并且已安装全文搜索.

My SQL Server version is 2016 and full-text search is installed.

推荐答案

要在SQL Server停止列表,全文目录等中使用波斯语,我们应该使用Neutral.如果您在目录中不使用Neutral,我建议您将其更改为Neutral,有时如下所示为空:

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';

您可以使用以下列表以波斯语和英语添加任何停止列表文本:

You can use below lists for add any stop list text in Persian and English :

下载波斯语或波斯语停止列表许多单词

下载波斯语或波斯语停止列表对于标准字

这篇关于波斯语全文索引停止列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-11 15:43