Ask a questionAsk a question
 

AnswerFull-text using 'contains'

  • Thursday, October 15, 2009 11:07 PMDexeloper Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Suppose I have a table, under full-text indexing, with column data containing values 'law','lawson','byelaw'. I do a select using CONTAINS '"*law*"'. The first two records are returned but not the one with 'byelaw'.
    I suspect the leading '*' is ignored when using 'contains'. Is this by design? I find this hard to believe.
    Any thoughts?

Answers

  • Friday, October 16, 2009 2:38 AMHilary CotterMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Its by design. Rumor has it the prefix based wildcards are being planned for the next version of sql server.

    looking for a book on SQL Server replication? http://www.nwsu.com/0974973602.html looking for a book on SQL Server 2008 Administration? http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search? http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941

All Replies

  • Friday, October 16, 2009 2:38 AMHilary CotterMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Its by design. Rumor has it the prefix based wildcards are being planned for the next version of sql server.

    looking for a book on SQL Server replication? http://www.nwsu.com/0974973602.html looking for a book on SQL Server 2008 Administration? http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search? http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941
  • Friday, October 16, 2009 7:48 AMDexeloper Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Well I won't hold my breath. If Microsoft haven't done it after four versions of SQL Server I can't see them doing it now.

    I find it amazing (and extremely disappointing) that matches found using an ordinary '&like%' cannot be found using full-text indexing.