We are using Full-text search to check postcodes and addresses, we have found that NNx, where x is a number, is considered a noise word. We know the issue but can't think of a clean solution, besides checking if the search word contains NN and then using LIKE instead.
We are using this code.
SELECT DISTINCT
*
FROM CONTAINSTABLE(dbo.AddressData, Data, N'NN1', 1000) C
INNER JOIN dbo.AddressData AD ON AD.Id = C.[KEY]
INNER JOIN dbo.Address A ON A.Id = AD.AddressId
Does anyone have any ideas on how to escape or stop full text from seeing the NN as a noise word?
UPDATE: We added an if that checks for NN in the input string, and if NN is there we just use Like instead but this has a big effect on performance. went from less than a seconds to over 5 :/ any one have a better solution?
You are using SQL server right?
From SQL Server 2005 noise words have been replaced by stopwords. You can edit the "stoplists" so that NNx is not a stopword anymore.