开发者

Having trouble using 'AND' in CONTAINSTABLE SQL SERVER FULL TEXT SEARCH

开发者 https://www.devze.com 2022-12-28 21:56 出处:网络
I\'ve been using FULL-TEXT for awhile but I cannot seem to get the most relevant results sometimes. If I have an field with something like An Overview of Pain Medicine 5/12/2006 and a user types An O

I've been using FULL-TEXT for awhile but I cannot seem to get the most relevant results sometimes.

If I have an field with something like An Overview of Pain Medicine 5/12/2006 and a user types An Overview 5/12/2006

So we create a search like:

"An" AND "Overview" AND "5/12/2006" - 0 results (bad)

"Overview" AND "5/12/2006" - 1 result (good)

The CONTAINSTABLE portion of my query:

FROM         c开发者_运维百科e_Activity A
INNER JOIN
    CONTAINSTABLE(View_Activities,(Searchable), @Search) AS KeyTbl ON A.ActivityID = KeyTbl.[KEY]

"Searchable" is a field contains the activity title, and start date(converted to string) in one field so it's all search friendly.

Why would this happen?

[UPDATE]

Okay I just tested the NOISE word theory. I used "Pain" AND "Overview" AND "5/12/2006" and it works fine.

But if I add "of" it fails. 'Of' and 'An' must be noise words.

Now the question is, how do I make this just IGNORE the words, instead of removing it from the result if a noise word exists?

Any tips?


Perhaps your current word breaker ignores "an" as noise.

0

精彩评论

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