Appearance
Search Options
Relewise Search can be fitted with several options to fine-tune and improve your users' search experience. Below are the most common features.
Filters
It is possible to apply a number of filters to your searches, to define how and when it should return results. These filters range from defining search restrictions based on data key values, to filtering based on assortments, entity category, or view- and purchase behavior tracked to the user. In this way, filters are designed to narrow and specify the scope of a search.
To find a list of available filters in Relewise, we refer either to our SDKs, available via our examples page. Alternatively, the filters can be found on our swagger page.
Filters may also be applied to recommendations.
Batching Searches
Batching is an option that allows for the grouping (batching) of multiple searches into a single request. Batching ensures faster response and load times, and ensures that the result of multiple searches displayed on the same page will be delivered at the same time, thus making sure that all search-related objects display simultaneously.
Specifically, you may use SearchRequestCollection
, which has the Requests
property. Here, you can add a number of different SearchRequests
to be served back to you in one go.
Using this method will return a ResponseCollection
with a Responses
collection. The index of this collection is automatically aligned with the index of the request to ensure ease of use.
Unlike batched recommendations, batched searches can return both product and content results without issue.
Search Batching Use Cases
For instance, you might want to execute both a ProductSearchRequest
and a ContentSearchRequest
at the same time, to present users with both product and content results to their query. Batching them ensures that the results are delivered simultaneously on the page, which makes for a better user experience.
Another use case might be to batch ProductSearchRequest
with SearchTermPredictionRequest
, so that your search results provide product results as well as proactive search term predictions.
The Search Live View
Batching is reflected in the Search Overview, where batched requests are displayed as a single request instead of multiple. To see if a request is batched, and to inspect the details of the batched request, you can click on the Details icon next to the request on the Live View page.
Promoted Variants
When performing a search, it is possible to configure your products to always display a certain variant - typically called a Default Variant or a Promoted Variant.
Configuring promoted variants allows you to define which product variant is shown in search results and on category listings, as an alternative to the default behavior where Relewise picks the most popular variant of the product. This configuration will, however, be overruled if another variant of the product is a better textual match to the search query.
The promoted variant can be configured at a dataset level, and must be done by specifying a datakey at variant level. This datakey can either be a Boolean (true = promoted), or a Double value to promote based on the numeric value in descending order.
If you wish to set up promoted variants, please contact us with the name of the datakey you want to use for promoting variants.
Product Result Score
When performing search requests that contain a term (as opposed to termless searches, often used to create PLP pages), you can use the Product Result Score to receive extra information about the quality of each result. The primary use for this is in Retail Media, where you can condition campaigns to only target products in the search results that are above a certain Result Score threshold.
To get the Product Result Score for a search request, you can use the Score
property of the SelectedProductProperties
. This setting can be set to return two different values: The Relevance Score and the Adjusted Score.
json
{
"$type": "Relewise.Client.Requests.Search.ProductSearchRequest, Relewise.Client",
"Term": "keyboard",
"Settings": {
"SelectedProductProperties": {
"DisplayName": true,
"Score": {
"Relevance": true,
"Adjusted": true
}
},
},
"Skip": 0,
"Take": 10,
"Language": {
"Value": "en"
}
}
json
{
"$type": "Relewise.Client.DataTypes.ProductResult, Relewise.Client",
"ProductId": "9751172481371",
"DisplayName": "Logitech K380 Multi-Device Keyboard",
"Variant": {
"VariantId": "logitech-k380-multi-device-keyboard",
"Rank": 9
},
"Rank": 9,
"Score": {
"Relevance": 100.0,
"Adjusted": 100.0
}
}
Relevance Score
The Relevance Score indicates how well the product matches the search term. The score is returned as a value between 0 and 100, with 100 being the best match, and 0 the worst.
The score is calculated on the basis of the following parameters:
- The weighting in the search index of the data field which the search term matched with
- The type of match that it was (exact, starts with, ends with, etc.)
Click here for Use case Examples
Use case Example 1
If:
- you have searched for the term
cardigan
, and - you get a product result that has the exact word
cardigan
in its Display Name, and - if the Display Name was the highest weighted field in the index,
then you can expect the result to have a Relevance Score of 100.
Use case Example 2
If:
- you have searched for
yellow lamp
, and - you get a product result that has the exact word
lamp
in its Display Name, and - it has the exact word
yellow
in a data attribute called Description, and - Display Name has the highest weight in the search index, and
- Description has a very low weight,
then you can expect the result to have a Relevance score greater than 50 and smaller than 100.
If, however, Description has a weight very close to the highest weight in the index, then the score will be very close to 100.
Use case Example 3
If:
- you have searched for
umbre
, and - you get a product result that has the word
umbrella
in its Display Name, and - Display Name is the highest weighted field in the search index,
then you can expect the result to have a Relevance Score of 90, as umbrella
starts with umbre
.
Use case Example 4
If:
- you have searched for
pants
, and - you get a product resul that has the word
pants
in its Category Name, and - Category Name has a low weight compared to the highest weight in the index,
then you can expect the result to have a low Relevance Score.
Adjusted Score
The Adjusted Score builds off of the Relevance Score, but also includes any adjustments made by Relevance Modifiers and Merchandising Rules, that boost or bury an entity's relevance by any amount.
Use case Example 1
If:
- the product result had a Relevance Score of 82, and
- the product was influenced by a Merchandising Rule that boosted it by 10%,
then you would get an Adjusted Score of 90.2.
Use case Example 2
If:
- the product result had a Relevance Score of 100, and
- the product was influenced by a Relevance Modifier that buried it by 60%,
then you would get an Adjusted Score of 40.