问题
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