Copied to clipboard

Flag this post as spam?

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


  • Nik Wahlberg 639 posts 1237 karma points MVP
    Aug 10, 2010 @ 18:15
    Nik Wahlberg
    0

    Examine - IExamineValue

    I have the following environment:

    Win 7
    .Net 4.0
    Umbraco 4.5.1

    I am trying t o implement Examine by using the .Escape() and/ or .Fuzz() modifiers so that the search is more comprehensive. For some reason, I am not able to get to those methods and was curious to see if someone could give me some hints. Here's what I have so far:

    var criteria = ExamineManager.Instance
                        .SearchProviderCollection["BioSearcher"]
                        .CreateSearchCriteria(UmbracoExamine.IndexTypes.Content);
    
                var filter = criteria
                   .GroupedOr(new string[] { "nodeName", "pageContent", "pageHeading", "metaDescription", "eventSummary", "newsSummary", "courseTitle", "bioTitle", "bioDescription" }, SearchTerm)
                   .Not()
                   .Field("umbracoNaviHide", "1")
                   .Compile();
    
                SearchResultsCollection =
                    ExamineManager.Instance.SearchProviderCollection["BioSearcher"].Search(filter);

    I followed what @slace wrote up in the Farm blog here

    Thanks!
    Nik

  • Aaron Powell 1708 posts 3044 karma points c-trib
    Aug 11, 2010 @ 00:50
    Aaron Powell
    0

    Escape/ Fussy/ etc are all extension methods which reside within the UmbracoExamine.SearchCriteria namespace, try adding that and they should appear on any System.String.

    We put them into another namespace so that you don't have them CONSTANTLY appearing as they are on a very low-level (and common) CLR type

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Aug 11, 2010 @ 02:01
    Nik Wahlberg
    0

    Right-on man! That did the trick. Thanks for chiming in.

    -- Nik

  • 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