We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19521
    • 3 Posts
    How can I make AjaxSearch (1.9.0) group the search results by each documents ultimate parent?

    Say I have a site with 3 main menu items:

    • Products
    • Services
    • Support

    each of these has children.

    I want my search result to group by "Products", "Services" or "Support" so the user can see where each page in the result belongs. I don’t want to display the entire breadcrumb for each document.

    Is this possible within AjaxSearch 1.9.0? Any suggestions?

    Thanks!
      • 5811
      • 1,717 Posts
      To define a group of results, you need first, to define a simple text TV, for instance call it "itemType" then link this TV to your documents, and tag all the documents you want as "Products" or "Services" or "Support". Untagged documents will be displayed under the "uncategorized" group of results.

      The documents of a same category are not necessary in the same container. A group of results is defined by tagging not by a container.

      Then call ajaxSearch with &category=`itemType`.
      As example look at this demo.

      This document: "how to implement a category" should help you too.