Copied to clipboard

Flag this post as spam?

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


  • schlubadub 102 posts 617 karma points
    May 20, 2015 @ 10:50
    schlubadub
    0

    Official way to implement Search for 7.2 with Grid?

    Can anyone tell me what the proper way to implement a site search is for 7.2 that can parse the content inside grids as well? Do I need to use a 3rd party project like ezSearch or Solis Search?

    I have come across a link to this gist, but I don't know if it's the best approach https://gist.github.com/abjerner/bdd89e0788d274ec5a33

    I've tried to use the Examine like below, but it only seems to match on a couple of pages and returns a lot of garbage if I look at the value or content property of item:

    IEnumerable<IPublishedContent> results = Umbraco.TypedSearch("keyword", false, "ExternalSearcher").Where(c => c.TemplateId != 0 && c.ItemType == PublishedItemType.Content);
    
    <ul>
    @foreach (var item in results)
    {
      <li>
        <a href="@item.Url">
           <strong>@item.Name</strong>
        </a>
      </li>
    }
    </ul>
  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    May 20, 2015 @ 10:57
    Ismail Mayat
    0

    You could use ezsearch however you will need todo some additional coding to get the grid content into the index.

  • schlubadub 102 posts 617 karma points
    May 20, 2015 @ 11:23
    schlubadub
    0

    Yeah, I've just done some initial testing with ezSearch and it's failing to index almost everything :\ I'm really quite surprised that something as essential as a search function isn't part of the core, out of the box. Well, all of the Examine stuff is... but none of the starterpacks actually use it, and something like the "Hybrid Framework for Umbraco v7 Best Practices" uses ezSearch but doesn't use the Grid.

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    May 20, 2015 @ 11:43
    Ismail Mayat
    0

    Gatheringnode data event is your friend see http://thecogworks.co.uk/blog/posts/2012/november/examiness-hints-and-tips-from-the-trenches-part-2/ you will need to use that and then get the grid content out and inject into the index.

    Ismail

  • schlubadub 102 posts 617 karma points
    May 28, 2015 @ 05:36
    schlubadub
    0

    I'm not really sure how that link will help me, as the post is quite old and pre-dates the Umbraco grid. It seems like it's going to be a heck of a lot of work to get the data I need. I think something like this seems to address Grid indexing specifically: https://gist.github.com/abjerner/bdd89e0788d274ec5a33

  • Arthur 10 posts 80 karma points
    Dec 20, 2019 @ 11:30
    Arthur
    0

    the demo site for solis search is not working for some reason. it doesnt accept username and password https://demo.solissearch.com/umbraco/#/login/false solis solisdemo

    Also, could you please guide me with the working code as how to implement datefacet in solis search on news pages. the code example on solissearch.com doesnt work. i am using solissearch v5.5.0-1.

    regards,

Please Sign in or register to post replies

Write your reply to:

Draft