Query Mappings

How to define custom results for a query

In this post, we will show you how to use the Site Search 360 query mapping editor to easily create custom search results for a certain query or queries.
set up custom results for search queries
You can find the query mapping editor in the Control Panel under Search Control > Query Mapping. When you open this tab, you will see all existing query mappings that you have already defined.

Please note: in addition to defining new mappings you may import a configuration file for Google Site Search promotions if this was the engine you used before.

If you want to start from scratch, click the "New Mapping" button to open the query mapping editor.
add new mapping
There are four steps to creating a new mapping.
  1. Under "Query" you have to define the search query to which the mapping should be applied. This can be any text or regular expression.
  2. Next, you the have to select the matching type. Your choices are as follows:
    • Match: The visitor's search query has to be a perfect match for the mapping to apply. If you enter "fish" as the query in step 1 and select the type "match", then the mapping will only be triggered when the visitor's query contains the word "fish" and nothing else.
    • Phrase: 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 you specify for "fish" in this case.
    • Contains: The mapping will be applied if the visitor's search query contains the mapped query. In this case the mapping will be triggered by all incoming queries that contain "fish", including "fishes", "fishermen", or even "selfish".
    • Regular Expression: The query defined in point 1 should be a regular expression that will match the incoming queries. This could be something like - you can learn more about regular expression here.
  3. If you want to include this query in your search suggestions switch this toggle to "YES". This allows you to provide custom autosuggestions to your visitors with predefined results, an extremely powerful way to customize your visitors' search experience.
  4. In step 4 you define what will happen with the search query you are mapping. There are three options available, which will be described in the following sections:

Order Results

The first tab lets you reorder the natural ranking of the search results - even by content group. You may also place custom "artificial" search results.
query mapping editor
The above image shows you the different possibilities you have to reorder your results.
  1. Here you see the list of content groups available for the entered query. If you didn't define any content groups or no specific content group was matched, the standard content group "OTHER" is shown.
  2. The three horizontal bars allow you to move search results up and down in the result list, like so:
    drag and drop results to re-order
    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 a search result from the result list by clicking the small "x" in the top right corner of the search result.
  4. Clicking "pin results from here up" will lock the selected search result in place along with all the results above it. The results will be marked green and will stay in the exact position where you placed them.
    pin results to a specific position
    Please note that dragging a result will also cause it (and the results above it) to be pinned. It is not possible to pin a search result in position 5 and leave the results in position 1-4 unpinned.
  5. You may restrict the search results to only the pinned results using the toggle in the top right. Setting the toggle to "ON" will remove all other results and show only the pinned results to the user.
  6. Use the "Add Custom Result" button to create a featured search result or a promotional banner yourself.
    custom result html
    Site Search 360's default CSS is not automatically applied to custom results so you have complete freedom to customize the HTML structure and define the CSS classes as you see fit. However, if you want your custom snippets look like the rest of your results (v13 and older), use one of the templates below.
    Note: your custom results can be dragged around like natural search results to be placed in a certain position. A custom result is always pinned.

Custom result HTML templates

You can use the following templates to copy and paste them into the Query Mapping editor. Please remember to replace the {CONTENT} between the brackets, including the brackets, with real links and text.
For a search result snippet without an image:
For a search result snippet with an image:
If you want to display your custom result as a search suggestion (in the drop-down below your search box), fill out the "Suggestion HTML" field as well. Here's a default markup you can use (v13 or older).

For a search suggestion without an image:
For a search suggestion with an image:


The query mapping editor's "Rewrite" tab allows you to rewrite a query.

Rewriting a query means that when a visitor searches for a mapped query, the engine will search instead for the query you determined and show a different result set. For example, someone could search for "telephone" and you could rewrite this internally to "contact details" to show the results for contact details instead. The user will not see that a rewrite has occurred.

This feature is most often used when you see recurring search terms with no results. You may manually select a new query that will lead the users to the most relevant results.  

Redirect to URL

Sometimes it is best to redirect a user directly to the page with the desired information when a certain search term is entered. To do this, use the "Redirect to URL" tab.

Simply enter the relevant URL into the input field and save the mapping - the user will be redirected instantly.

If you are using the SS360 API, please be aware that the resulting JSON looks different when a query is redirected.

If you have questions, please get in touch with us to help you by email or via Dev Chat.