Content Groups

What is the content group feature and how do I use it?

This article explains the importance of content groups and shows a way to implement the content group feature in SS360.

Websites often separate content into categories. Take for example the news website today.com. In the above screenshot you can see their category navigation, which groups all their articles into categories like videos, food, or health & wellness.

If you group your content into categories of course you want to have them mapped to your search engine.

If a user searches for the term "Jimmy Fallon" on today.com, SS360 would deliver all hits within all categories in one big list. But what if the user is only interested in videos with "Jimmy Fallon" out of the "video" category or if he wants to see the cooking tips out of the "food" category?

To solve this issue, you can define content groups for the SS360 search engine. This way it is possible to generate category filters that may be clicked to reduce the huge list of initial results to a subset of hits within the chosen category.

How do I set up content groups?

You will find all settings related to content groups in the control panel under "Indexing Control > Content Groups".

Press the "Add content group" button to create an empty template for the new content group.

The empty template lets you define the settings for the first content group.

Let's look at the settings in detail:

  1. Define a title for the content group. This title will show in the search result as the name for the content group filter.
  2. Tell the system how to recognize a content group on your site. There are two ways to do this:
    1. URL Pattern (regular expression): If you navigate on today.com to the food category the URL changes and may look like "https://www.today.com/food/feel-better-foods-tips-recipes-dr-oz-t116700". The indicator for the food category is the text snippet in the URL. Another example: when you click the navigation point "Health & Wellness" the URL changes to "https://www.today.com/health/cvs-limit-opioid-prescriptions-7-day-supply-t116587", so for this content group the indicator would be .

      If you want to catch multiple URL patterns just use a pipe separator |. For example, would catch both URLs and put them in the same content group.
    2. XPath: If your URLs don't indicate the category you want to make into a content group you may use the XPath feature. Here you can point to a unique DOM element that is only available on pages which should go into this content group. Coming back to our today.com example, we can check the source code for unique elements within a page in the "Healt h& Wellness" category.

      Near the headline of each article in this category you find a link to the category overview page, which could serve as an indicator for this content group. A valid XPath expression to find this indicator would be Only the existence of this indicator will classify this page as part of the content group "Health & Wellness"
  3. Here you place the URL text snippet (point 2.1) or the XPath expression (point 2.2) depending on which you chose.
  4. The crawler always tries to determine the correct title of the current page, but if you want the crawler to pick up the text of a specific element then you may place a valid XPath here.
  5. The same applies to the preview thumbnail; the image XPath points the crawler to the correct image to use.
  6. Normally the crawler indexes all the content on a page, even the navigation bar or the sidebar if not excluded. You may place an XPath expression to point to the correct content node of your website template.
  7. If there are any nodes in the template that hold content which is not relevant for the search you may place an XPath here to point to that element to exclude it from the indexing process.

After you have defined your content groups don't forget to hit the "Save" button at the very bottom of the page.

It takes only a short time until the system updates your index information to provide the new content group filters above the search results. And here they are:

You may style the content group filters any way you want, it is fully customizable via CSS.

Using the API

If you want full control over your search and the search result page you may use the SS360's HTTP REST API to add content to your index. It's possible to set the appropriate content group for each page you index directly in the JSON object you send to the API.



To do so, just set the attribute "contentType" for each page to the name of the content group it belongs to.

Anything still unclear? Please get in touch with us to help you via email (mail [at] sitesearch360.com), Gitter, or our chat widget on the main site.