如何在Sql Server 2008中进行全文搜索,其中数据包含多种语言? [英] How do I do a full text search in Sql Server 2008 where the data contains multiple languages?

查看:119
本文介绍了如何在Sql Server 2008中进行全文搜索,其中数据包含多种语言?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Sql Server 2008 R2中有一个数据库表,它包含以多种语言存储的数据,包括英语,瑞典语,匈牙利语和德语。

该表使用Latin1_General_CI_AS排序规则。全文目录的表格分配了多语言列索引。



我有两个问题:


  • 在目录属性中,必须为分词符指定一种语言。这目前设置为英语。如何使用多种语言进行分词?

  • 匈牙利语甚至在可以选择用于分词的语言列表中都不可用。如何配置全文搜索以搜索匈牙利文字?



表格中的每一行只包含一种语言。根据微软的说法,sys.fulltext_languages,匈牙利语不是支持全文搜索的语言。

解决方案


$ b

完整的受支持语言列表位于 http ://msdn.microsoft.com/en-us/library/ms176076.aspx



您似乎还不得不选择一种语言或另一个:

http://blogs.msdn.com/b/sqlcat/archive/2008/11/06/best-练习集成全文搜索ifts-in-sql-2008.aspx


处理多种语言在
单个文档中是一个难题。
您使用哪个分词器来分割
原始文档,并且您将为
指定哪个
语言的查询?例如,如果您有一个带有韩币和英币以及

文档,则您使用韩文分词符到
处理文档,然后如果
在文档中搜索英文单词
只能找到确切的单词和
而不是任何其他形式的单词(如
ing和s)。



I have a database table in Sql Server 2008 R2 which contains data stored in multiple languages including English, Swedish, Hungarian and German.

The table uses the Latin1_General_CI_AS collation. The full text catalog has the table assigned to it with an index on the multi-language column.

I have two problems:

  • In the catalog properties, a language has to be specified for word breaks. This is currently set to English. How do I get it to use multiple languages for word breaks?
  • Hungarian is not even available in the list of languages that can be selected for word breaks. How do I configure the full text search to search Hungarian text?

Each row in the table contains only a single language.

解决方案

According to Microsoft, sys.fulltext_languages, Hungarian is not a supported language for Full Text Search.

The full list of supported languages is at http://msdn.microsoft.com/en-us/library/ms176076.aspx

It also appears that you are going to have to choose one language or another:

http://blogs.msdn.com/b/sqlcat/archive/2008/11/06/best-practices-for-integrated-full-text-search-ifts-in-sql-2008.aspx

Handling multiple languages in a single document is a hard problem. Which word breaker do you use to shred the original document, and which language are you going to specify for the query? For example, if you have a document with Korean and English and you use the Korean word breaker to process the document, then if you search the document for English words it will only find the exact words and not any other forms of the words (like ing and s).

这篇关于如何在Sql Server 2008中进行全文搜索,其中数据包含多种语言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆