none
Code to Convert Google-Like Query to Full-Text Search

All replies

  • Hi Jonathan,

    Thanks for your great code sharing here which will definitely benefit to our community users. Meanwhile, I will move this thread another forum which is dedicated to Full-Text Search.


    Best Regards
    Alex Feng | Forum Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
    Tuesday, June 28, 2011 6:14 AM
  • Someone knows some code for doing this in unmanaged C++?

    Thanks & Regards,

    Rui

    Friday, February 24, 2012 11:53 AM
  • I do not currently know of such.  This is a refinement of Michael Coles earlier C# version that removes the special library:

    http://www.sqlservercentral.com/articles/Full-Text+Search+(2008)/64248/ - Michael Coles' version

    I do observe that the source code for both these is available, so you could convert the code to C++ if it suited you to do so.

    RLF

    Friday, February 24, 2012 2:50 PM
  • I haven't bothered to port the code to C++, but it seems like it would be rather straight forward to do so. C# and C++ are quite similar in syntax.

    UPDATE: I will be updating my code over the next month. While what's there seems to work fine. I found that it allowed cases that SQL Server does not. For example if you say "not abc", the resulting query causes an error in SQL Server because you can't search only for matches that don't match. There are other variations as well. The update I'll be posting has an additional step to traverse the expression tree, removing any expressions that are unsupported.


    Jonathan Wood • Black Belt Coder

    Friday, February 24, 2012 8:46 PM
  • I haven't bothered to port the code to C++, but it seems like it would be rather straight forward to do so. C# and C++ are quite similar in syntax.

    That is true for managed C++ and C#, but are not so similar for unmanaged C++ since managed code libraries are  not available in unmanaged code.

    Anyway for managed code your code are great.

    Thanks

    Monday, February 27, 2012 9:52 AM