Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Rich Green 2246 posts 4006 karma points
    Aug 31, 2011 @ 14:27
    Rich Green
    0

    Reserved words breaking examine search

    Hey,

    Using the following code to query examine, but any reserved words (if, and, etc.) are breaking the search

    var searchStr = Request.QueryString["search"];

    var criteria = ExamineManager.Instance

                        .SearchProviderCollection["GeneralSearcher"]                 
                        .CreateSearchCriteria(UmbracoExamine.IndexTypes.Content);

        var filter = criteria

            .GroupedOr(new string[] {"nodeName,bodyText" }, searchStr)

            .Not()

            .Field("umbracoNaviHide", "1")

            .Compile(); 

     

    Do I need to escape these first and if so what's the full list and the best way?

    Cheers

    Rich

  • Anders Brännmark 220 posts 250 karma points
    Sep 15, 2011 @ 10:28
    Anders Brännmark
    0

    To the top...

  • James Woodmancy 6 posts 26 karma points
    Jan 20, 2012 @ 14:05
    James Woodmancy
    0

    Hi,

     

    Did you ever find a solution to this..my search is also breaking when I search for IT..

  • Jeroen Breuer 4861 posts 12138 karma points MVP 3x admin c-trib
    Jan 20, 2012 @ 14:08
    Jeroen Breuer
    0

    Maybe this is fixed in the latest version of Examine. You can download it here: http://examine.codeplex.com/releases/view/77362.

    Jeroen

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies