patternsqlMinor
Full text search wont find post codes "NNx" where "x" is a digit
Viewed 0 times
wontfullsearchtextwherepostcodesfindnnxdigit
Problem
I have a string with a post code
My stop words list is empty.
I looked at the indexed keywords and
Suggestions?
NN2 7DG. SQL Server can perfectly find 7DG but not NN2.My stop words list is empty.
I looked at the indexed keywords and
NN2 is not even there, while 7DG is-- list indexed keywords
SELECT * FROM sys.dm_fts_index_keywords (DB_ID('MyDatabase'), OBJECT_ID('MyTable'))Suggestions?
Solution
Welp, I found the answer here, only minutes after posting:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/8592ea09-fcfb-4fec-a3a4-5e03dedcee3a/problem-with-strings-starting-with-nn-a-number?forum=sqlsearch
This is because of the way that numbers are stored in the full-text indexes.
So, i think that there is little that you can do about this except work around it.
P.S. Wow, just wow...
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/8592ea09-fcfb-4fec-a3a4-5e03dedcee3a/problem-with-strings-starting-with-nn-a-number?forum=sqlsearch
This is because of the way that numbers are stored in the full-text indexes.
- Indexed numbers such as "123" are stored in the fulltext index as "NN123".
- This behavior is controlled by the wordbreakers.
So, i think that there is little that you can do about this except work around it.
P.S. Wow, just wow...
Context
StackExchange Database Administrators Q#316848, answer score: 3
Revisions (0)
No revisions yet.