How to do a CONTAINS() on two columns of Full Text Index Search SQL

感情迁移 提交于 2019-12-06 01:22:31
aks

Since the NameID field is of type varchar, full-text will handle the indexing just fine.

The reasoning behind CONTAINS(NameID, '1') not returning any search results is that '1' (and other such small numbers) are regarded as noise words by full-text and filtered out during indexing time.

To get a list of the stop words, run the following query -

select * from sys.fulltext_system_stopwords where language_id = 1033;

You need to turn off or modify the stop list, an example of which can be found here.

I think the biggest problem here (and I edited my question to reflect this) is that I've got integers representing the primary key's name, which Contains() function on the full text catalog is not compatible. This is unfortunate and I'm still searching for a full text alternative to working with catalogs of integers.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!