1

I call my statement with CONTAINS function, but sometimes it does not return correct records, e.g. I want to return row which contain in one field word 'Your':

SELECT [Email]
      ,[Comment]
  FROM [USERS]
  WHERE CONTAINS(Comment, 'Your')

It gives mi 0 result despite that this field contains this word (the same with 'as', 'to', 'was', 'me'). When I use 'given' instead of 'Your' then I receive a result. Is there maybe a list of words which cannot be used with CONTAINS? Or maybe this words are to short (when i use 'name' then i receive the results)? The work 'Your' is at the beginning in field Comment.

The field is of type 'text' and has enabled full-text index.

szaman
  • 6,666
  • 13
  • 53
  • 81

1 Answers1

2

Words such as those you mention are "stop words"; they are expressly excluded from being indexed and searched in Full Text Search due to how common (and thereby meaningless for searches) they are. You'll notice the same thing when searching Google, for instance.

It is possible to edit the list, but I would avoid doing so except perhaps to add words to it; the words in the list are chosen very well, IMHO, for their lack of utility in searches.

Andrew Barber
  • 39,603
  • 20
  • 94
  • 123