Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why isn't my single-character full text search working?

Given this code, I'm getting back no results:

SELECT TOP 10 * FROM MyTable WHERE CONTAINS(TextColumn, '"W"')

Things I've checked:

  • Longer words return a result
  • There are no stop LIST associated with this index
  • There is definitely text such as "James W Brown" in the column
  • The full text index is up to date.

EDIT: I was looking for a stop lists, not a stop word, associated with the index.

like image 672
Jonathan Allen Avatar asked Dec 04 '22 04:12

Jonathan Allen


1 Answers

The answer is to make sure you have an empty stop list associated with the index. It isn't enough to simply have no stop list, as it would just use the default stop list.

CREATE FULLTEXT STOPLIST [EmptyStopList] ;
GO
ALTER FULLTEXT INDEX ON MyTable SET STOPLIST [EmptyStopList]
like image 126
Jonathan Allen Avatar answered Jan 08 '23 17:01

Jonathan Allen