Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Full text searching with alphanumeric values

Author  Topic 

syedalimurtuza
Starting Member

4 Posts

Posted - 2012-03-27 : 12:41:43
Hi All,

I'm running to an issue where FreeTextTable doesn't give expected results when the search criteria is alpha-numeric. For example, "039A" gives records where "039A" are listed exclusively but there are many records with values such as "W039A", "WR039A", which are expected to show in the result but it doesn't.

I though this issue would have been addressed with the latest release of Sql Server (2012) but same behavior exist on that version too.

Please advise.

Thanks.

X002548
Not Just a Number

15586 Posts

Posted - 2012-03-27 : 13:57:22
it would help if you post your code

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page

syedalimurtuza
Starting Member

4 Posts

Posted - 2012-03-27 : 14:29:19
Hi Bret,

Following is the clear explanation and example:

I'm running SQL Server 2005, Win Server 2003 SP2.

I've edited the noise words txt files at Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\FTData (noiseENU.txt, noiseENG.txt, and noiseNEU.txt) to remove numbers (0-9). And I've rebuilt and deleted/recreated my indexes without any seeing any changes in the search results.

I need to search for records using a name that includes numbers. For example: "ABC12345", "ABC12346", "ABC12347", "ABCDEF", "12-345-654", "ABC-12F" etc.

However, whenever I use the FULLTEXT search (or CONTAINS), I don't get any results.

Example:
SELECT * FROM CONTAINSTABLE(myTable, myField, 'ABC123');
SELECT * FROM FREETEXTTABLE(myTable, myField, 'ABC123');

There are 0 results from both of the above searches.

When I use LIKE, then I will get results. For example:
SELECT * FROM myTable where myField LIKE '%ABC123%';
Go to Top of Page
   

- Advertisement -