Sql Server 2008 - 从系统停止列表中删除一个单词?

发布于 2024-11-19 12:46:53 字数 567 浏览 6 评论 0原文

我试图从停用词列表中删除“-”字符,但我做不到。我创建了继承自系统停止列表的自定义停止列表。当我尝试从停止列表中删除“-”时,sql server 告诉我该字符不在停止列表中。这是我正在使用的sql语句:

ALTER FULLTEXT STOPLIST "mystoplist" DROP  '-' LANGUAGE 'Brazilian';

我也尝试过创建一个不从系统继承的停止列表,它也不起作用。当然,每次更改时我都会重新填充目录。

我猜 sql server 也在以某种方式使用系统停止列表,但我不知道如何从系统停止列表中删除字符。

我需要的是像“blablabla-blablala”这样的字符串(有一些葡萄牙语单词使用“-”字符)只有当我执行如下查询时才能找到:

where contains(field, "blablabla-blablala")

并且当我执行如下查询时永远不会找到:

where contains(field, "blablabla")

Any想法?

I am trying to drop the "-" character from the stop words list, but I am not able to. I have created my custom stop list which inherits from the system stop list. When I try to delete the "-" from the stop list, sql server tells me that that character is not on the stop list. This is the sql statement I am using:

ALTER FULLTEXT STOPLIST "mystoplist" DROP  '-' LANGUAGE 'Brazilian';

I have also tried to create a stop list that does not inherits from the system, and it also does not work. At every change I repopulate the catalog, of course.

I guess sql server is using somehow the system stop list also, but I do not know how to delete characters from the system stop list.

What I need is that strings like "blablabla-blablala" (there are some portuguese words that use the "-" character) to be only found when I execute a query like:

where contains(field, "blablabla-blablala")

And to be never found when I execute a query like:

where contains(field, "blablabla")

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

少女净妖师 2024-11-26 12:46:54

事实证明,这是分词器中的问题,而不是所描述的停止列表中的问题 此处

对于某些语言(包括我的语言),“/”被视为断字符。

我无能为力,只能尝试实现我自己的 IFilter

It turned out that this is a issue in the word breaker, not in the stop list as described here.

"/" is considered as a word breaker for some languages (included mine).

There is nothing I can do but try to implement my own IFilter.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文