Full text index search using one-character word

I'm using full text index search. There are few cases when for our customer it is important to find words even with only one character. Unfortunately it seems that SQL server ignores such words, although I haven't found assurance for that in docs.

So here is the scenario. Suppose I want to find word 3. My table data are as follows:

select * from test_fts;
id          txt
----------- --------------------------------------------------
1           3 trees
2           33 trees
3           green trees

Now I'm trying to find the word 3.

select * from test_fts
where contains(txt, '"3"')
id          txt
----------- --------------------------------------------------
Informational: The full-text search condition contained noise word(s).

select * from test_fts
where contains(txt, '"3*"')
id          txt
----------- --------------------------------------------------
2           33 trees

OK 3 is a noise word. I edited noise word list, rebuilt catalog and now the warning about noise words is gone, although the query do not return expected rows.

select * from test_fts
where contains(txt, '"3"')

id          txt
----------- --------------------------------------------------

select * from test_fts
where contains(txt, '"3*"')

id          txt
----------- --------------------------------------------------
2           33 trees

Comments

Popular posts from this blog

C# Crop white space from around the image

Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=xx.0.0.0, Culture=neutral, PublicKeyToken='xxx' or one of its dependencies.

The specified version string contains wildcards, which are not compatible with determinism.