且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

为什么SQL全文索引不能返回包含#的单词的结果?

更新时间:2023-02-07 07:38:11

The # char is indexed as punctuation and therefore ignored, so it looks like we'll remove the letter C from our word indexing ignore lists.

Tested it locally after doing that and rebuilding the indexes and I get results!

Looking at using a different word breaker language on the indexed column, so that those special characters aren't ignored.

EDIT: I also found this information:

c# is indexed as c (if c is not in your noise word list, see more on noise word lists later), but C# is indexed as C# (in SQL 2005 and SQL 2000 running on Win2003 regardless if C or c is in your noise word list). It is not only C# that is stored as C#, but any capital letter followed by #. Conversely, c++ ( and any other lower-cased letter followed by a ++) is indexed as c (regardless of whether c is in your noise word list).

相关阅读

技术问答最新文章