Full text search

  • Hi all.

    I have a requirement in which customer fills in a form.

    The provided form fields are searched against the coulmns

    in customer table. For example FirstName is searched

    against FirstName in the table and so on. If the form data

    is same as that of a table row than it is 100%. If for

    example FirstName, LastName, sortcode, accountno are

    exactly the same but present address or previous address

    doesnt match than it should return an appropriate %age to

    which these two are similar.

    I have written this query. Is it correct for my

    requirement? if not please help me in modifying such that it fulfills my requirements.

    mySQL = "Select * from Customer WHERE "&_

    "Title='"&pTitle&"' or "&_

    "CONTAINS(FirstName, '"&pFirstName&"') or "&_

    "CONTAINS(MidName, '"&pMiddleName&"') or "&_

    "CONTAINS(SurName, '"&pSurname&"') or "&_

    "DOB = '"&pDateofbirth&"' or "&_

    "CONTAINS(Address, '"&pPresentAddress&"') or "&_

    "CONTAINS(prevAddress1, '"&pPreviousAddress1&"') or "&_

    "CONTAINS(prevAddress2, '"&pPreviousAddress2&"') or "&_

    "AccountNo = '"&pAccountNumber&"' or "&_

    "SortCode = '"&pSortCode&"'"

    Regards

    Sajid

  • I confess I am not knowledgeable in this area and because of that I ask the following question.

    Why is full text search used in place of simply using LIKE.  In other words, isn't full text overkill in this situation?

    TIA

    GaryA

     

  • Well I think Like operator will not work in this situation. Full text search is fast and most important It can return a rank for each search result returned.

    Regards

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

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