Result Mappings

How to define custom results for a query

Result mappings grant you extensive control over the search behavior in response to specific search queries entered by your site visitors. This article explains how to set them up.

Let's start by opening your Site Search 360 control panel and going to the Result Manager -> Result Mappings section:

set up custom results for search queries
  1. Click on "+ Add New Result Mapping" and fill in the search term(s) for which this results mapping should be applied. Type any word or expression into the "Trigger" field:

    adding query terms as triggers

    Note that multiple triggers can be added by repeatedly clicking on "+ Add trigger".

  2. You can adjust the trigger rule. Your choices are as follows:

    1. Match: The visitor's search query has to be a perfect match for the mapping to apply.

      If you enter "fish" as the trigger in step 2 and select the type "match", then the mapping will only be triggered when the visitor's query contains the word "fish" and nothing else.

    2. Contains part of word: The mapping will be applied if the visitor's search query contains the trigger.

      In this case, the specified results will be shown for all search queries that contain "fish", including "fishing", "fishermen", but also "selfish".

    3. Contains entire word: The mapping will be applied if the visitor types in several search terms and the entire mapped query is among these terms (part of the search phrase).

      Taking the same "fish" query example, "fish and chips" or "fresh fish" will bring up the results that you specify for "fish" in this case.

    4. Regular Expression (Regex): You can come up with advanced matching rules if you are fluent in regular expressions. So, your trigger could be something like:

      ^(fish hook|fishhook|catching fish)$

      You can learn more about regular expressions here.

  3. Now, select what should happen when the specified queries are triggered:

    There are three options available, which will be described in the following sections:

Customize Results

  1. Here you see the list of result groups available for the entered query.

  2. You can drag and drop the results freely to rearrange them.

    By dragging and dropping a search result, you may choose a new position for it in the list of naturally ranked search results.

  3. You can remove an unwanted result from the result list by clicking the "👁", which hides it.

  4. Any result can be pinned to fix its position. You can pin multiple results one by one.

  5. You can restrict the search results to only show the pinned results with the toggle in the top right. Setting the toggle to "ON" will remove all other results and show just the pinned results to the user.

  6. Use "+" -> "Create new custom result" to create a featured search result or a promotional banner.

    If you select "HTML", you have complete freedom to customize the HTML structure and define the CSS classes as you see fit.

    However, if you want your custom result snippets to look like the rest of your results (v13), use one of the rest of the options or one of the templates below.

Note: your custom results can be dragged around and placed in a certain position just like natural search results. A custom result is always pinned.

Custom result HTML templates

The following templates match the default styling and structure of the search results rendered with our latest search script (v13).

Make sure to replace the {LINK}, {TITLE}, {TEXT}, and {IMAGE_URL} placeholders with the respective content.

Adding a custom result without an image:

<div class="ss360-suggests__content">
    <header class="ss360-n-section ss360-suggests__header">
        <span role="heading" class="ss360-suggests__link-wrap" aria-level="4">
            <a class="ss360-suggests__link ss360-ac-c" href="{LINK}" target="_blank">{TITLE}</a>
        </span>
    </header>
    <p class="ss360-suggests__snippet">{TEXT}</p>
</div>

Adding a custom result with an image:

<div class="ss360-suggest__image-container">
<a class="ss360-suggests__image-wrap" aria-hidden="true" tabindex="-1" href="LINK">
    <img alt="" aria-hidden="true" role="presentation" aria-label="{TITLE}" class="ss360-suggests__image" src="{IMAGE_URL}">
</a>
</div>
<div class="ss360-suggests__content">
    <header class="ss360-n-section ss360-suggests__header">
        <span role="heading" class="ss360-suggests__link-wrap" aria-level="4">
            <a class="ss360-suggests__link ss360-ac-c" href="{LINK}" target="_blank">{TITLE}</a>
        </span>
    </header>
    <p class="ss360-suggests__snippet">{TEXT}</p>
</div>

Adding a custom search suggestion without an image:

<a class="unibox__search-content unibox__search-content--link" href="{LINK}" title="{TITLE}">{TITLE}</a>

Adding a custom search suggestion with an image:

<div style="display:flex;">
    <img src="{IMAGE_URL}" width="{IMAGE_WIDTH}" height="{IMAGE_HEIGHT}" style="margin-right:16px;">
    <a class="unibox__search-content unibox__search-content--link" href="{LINK}" title="{TITLE}">{TITLE}</a>
</div>

Rewrite

Redirect to URL