Full text index querys and hyphens

  • Hi

    We have a table containing product information which is full text indexed on a searchKey field that is constructed when the data is imported.

     

    For example the search key may contain:

    "39641 DFE-530TX D-LINK DFE-530TX + 10/100BASETX Desktop Fast Ethernet & Dual Speed Cards Desktop Fast Ethernet & Dual Speed Cards"

    Now we normally search this with a query along the lines of

     

    Select * FROM Products WHERE CONTAINS(Products.SearchKey, '"d-link*"')

      

    (Note: I dont usualy do a SELECT * just done to simplify the example)

    and an additional contains clause is added for each keyword that the user searches for, and usually this works fine, normaly except in a particular situation.

    But the problem I am having is with the way in which sql seems to be handling certain hyphenated words in particular using the example above if a customer types "D-LINK" as in the query shown above it would not find the product listed. Instead it will only match the product shown if I take out the hyphen in the searchkey field that is being full text indexed.

    It appears to me that the full text engine indexes it with the hyphen in but when I run the contains query it gets removed.

    Help, how do I get it to match what I am querying for without removing the hyphenation, or do I just not understand what it is doing, any answers appreciated.

    Thanks

    Barry Harding

     

     

     

  • This was removed by the editor as SPAM

  • Check you nois.eng file and see if the hyphen is in there, that could skew everything.



    Shamless self promotion - read my blog http://sirsql.net

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply