How to get a list of StopWords used in my FullText Catalog?

核能气质少年 提交于 2019-12-10 03:09:05

问题


Is there a way to get the StopWord list that my SQL Server 2008 FullText Catalog is using? And use it, in my C# codebehind?

I want to use it in a ASP.NET page that I use to search terms and highlight them.

The search page and the highlight are already working fine, but I want to improve the highlight. I don't want to highlight a word that is on my StopWord list.


回答1:


In sql server management studio if you ask the properties from the fulltext index you can see which stoplist it uses. See here.

You can then use the system views sys.fulltext_stoplists and sys.fulltext_stopwords to get the list of stopwords.




回答2:


SELECT * FROM sys.fulltext_stopwords |
SELECT * FROM sys.fulltext_system_stopwords

you can filter which stoplist you return by including the language code in a where clause

e.g. SELECT * FROM sys.fulltext_system_stopwords WHERE language_id=1033

(id 1033 corresponds to syslanguages 'English')

Alternatively, these can be found under the 'Full-Text Stoplists' category within the 'Storage' group against a standard SQL database



来源:https://stackoverflow.com/questions/4972991/how-to-get-a-list-of-stopwords-used-in-my-fulltext-catalog

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!