开发者

MSSQL 2008 full-text search: does stemming take grammatical gender into account?

We're using SQL Server 2008's full-text search to let customers retrieve records using FREETEXTTABLE() queries.

Given a search like:

SELECT * FROM FREETEXTTABLE(SomeTable, SomeValueColumn, 'Kunde')

Or:

开发者_JS百科
SELECT * FROM FREETEXTTABLE(SomeTable, SomeValueColumn, 'Leser')

(German words for 'customer' and 'reader', respectively.)

, I would expect results for the feminine forms of those words as well. However, those results only appear if I explicitly search for 'Kundin' or 'Leserin'.

The server's default full-text language is 1031 (i.e., German). The language component is NaturalLanguage6.dll, version 6.0.6001.18000.

According to a book, this should work:

SQL Server iFTS automatically includes stemming logic that accommodates gender rules for other languages [..]

Is this supposed to work? If not, can I make it work by A) installing an additional / different language component, or B) using a different full-text engine (e.g., Lucene.NET)?


I'm guessing that the discrepency is due to the fact that your first link above was written prior to the release of SQL 2008. The second link is a book written explicitly for SQL 2008.

Re-read the complete chapter in the SQL 2008 FTS book, as there are several steps you have to take in order to get it to work. Namely, identifying the language in your query.

Note this code block from page 116 of the book (which is using German as an example):

WHERE FREETEXT
(
  *, N'gift', LANGUAGE 1031
)

Here is the BOOKS ONLINE link (note Langugage argument):

http://msdn.microsoft.com/en-us/library/ms176078.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜