Copied to clipboard

Flag this post as spam?

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

  • Shada 55 posts 137 karma points
    Aug 12, 2016 @ 21:31

    Hi! I need to add the ability to search for content by the "Title" field among the 3 types (category, property, organization).

    My controller:

    public class SearchController : SurfaceController
        private readonly UmbracoHelper _uh = new UmbracoHelper(UmbracoContext.Current);
        public ActionResult Find(string text)
            var query = ExamineManager.Instance.CreateSearchCriteria()
                   .And().Field("title", text)
            var result = _uh.Search(query);
            return PartialView("~/Views/Partials/FindResult.cshtml", result);

    The structure of my site:


    -----Category (has Title)


    -----Property (has Title)


    -----Organization (has Title)

    But it seems it does not work properly. Please any help

Please Sign in or register to post replies

Write your reply to: