Appearance
Search
On the Search page, you can administer the details of the Relewise search engine. This allows for greater flexibility in defining terms that hold particular significance, or weeding out results that are undesirable.
Search Live View
The Live View is a tool used to examine the search requests currently being made on the site. The page displays both the type of request, the location it was made, the user ID (if made by a non-anonymous user), the results of the search (the IDs of products, categories or content pages), and the time it took to return the search query.
To save on resources, the Live View automatically disables after ten minutes of inactivity. This means that when first you visit the Live View page, you will need to hit the refresh button located beneath the graph to begin gathering data. Once you do so, the Live View will begin to pick up data from the site, and display it on the page. The Live View page shows up to the 30 latest queries made to the server.
Once you are receiving data on the Live View page, you can click the Details icon next to each request to learn more about the data being sent to Relewise.
The Search Live View is a useful tool for debugging the search engine. Viewing the details of the request (or batch, if batching is used) allows you to see exactly what is being sent to the Relewise API, and lets you identify behavior based on the available information.
Synonyms
Synonyms are used to link two or more search terms together, either one-way or multidirectionally. This includes pools of words, allowing you to group related words together in the search engine.
A one-way synonym is used to group subordinate terms under a common umbrella; for instance, if you are selling iPads and tablets, you will want to set up a one-way synonym from Tablet -> iPad. This means that if a user searches for "tablet", they will find all tablets including iPads. But if they search for iPad, they will only find the iPad products.
Multidirectional synonyms are used to equate two similar terms with one another. The terms "sweater" and "jumper" are functionally the same, so a multidirectional synonym ensures that the same products show up if you search for either of the two terms.
A Note on Multi-word Synonyms
Synonyms do not support multi-word 'from' words, such as 'open' compound words.
To learn more about this, please click here
Redirects
Redirects are used to return a predefined output in the form of a string when a given search term is sent. Redirects are created as overarching rules, and can be used to guide the user to a particular PDP or content page depending on the user's search request. The redirect itself is not a physical redirect to a given page, but rather a collection of redirect locations that is included in the SearchResponse. The redirect output has to be consumed by the website or server that requested it, whereupon the consumer enacts the appropriate action for the redirect. This could come in the form of an actual redirect of the browser page, or some kind of UI element such as a button that points the user towards a certain page instead.
json
"redirects": [
{
"id": "ae78c3aa-e386-4b3d-b072-4dd85d5efad0",
"condition": {
"kind": "Contains",
"value": "opening hours",
},
"destination": "/page/opening-hours"
}
],
Redirects are furthermore flexible in that they allow identification of search terms that equal, contain, start with or end with a chosen term, meaning that rules can be made to be as diverse and broad as you need them to be.
Stemming
Stemming is used to define the shared root of words, and thus help broaden user searches by smartly interpreting ambiguous search terms. The Relewise search engine comes pre-built with many of these stems, but you can use this feature to ensure that paticular cases that are important to your content are treated correctly.
For instance, fly is the root of flyer, flying, flies, flew, flown, etc. To ensure that any variation of the word "fly" end up on the same, correct page, you can add them to a stem list, and set the root word for them all.
Stemming can also be used to undo or avoid stemming, in the case that a word needs to be treated as its own entity rather than a stem. For instance, if you do not want runner to be stemmed down to run, you can use the Stemming rules in Relewise to identify runner as its own word. Thus, if a user searches for running, they will find hits for the word run, but if they search for runner they will return hits for that instead.
Decompounding
Decompounding is a way for the search engine to handle compound words, such as "flowerpot" or "doghouse". This is particularly important for languages that combine compound words into a single word, such as Danish or German. Decompounding let you control how words are broken down, and helps improve the discoverability of entities on your page.
Compound words are made up of a Head that defines what type of item it is; search engine is an engine, and doghouse is a house. On top of the Head sits the Modifiers, such as search or dog. A Head can easily have several Modifiers. Although uncommon in English, many Germanic languages (eg. German, Danish, Dutch) create new words by compounding several others. In this case, each added word needs to be specified as a Modifier to the Head, to ensure that the decompounding feature registers them correctly.
Example of decompounding a word in MyRelewise
The English word "doghouse" contains the Head, house, and the Modifier, dog. By decompounding this word, Relewise is able to serve accurate search results to queries about "house for dogs".
The decompounding feature functions by defining the Head of a given word, and then assigning one or more Modifiers to it. During a search, the algorithm actively checks the search term from back to front for potential Heads, and attempts to identify them as individual terms. This allows for greater parsing of 'natural language' searches.
Automated Decompounding
Relewise attempts to automatically create decompounding rules, in order to avoid having to create manual rules. This is done by analyzing the dataset and identifying the preexisting whitelisted words ("atoms") contained therein. Once Relewise has this list of words, we are able to decompound words that contain these atoms into their constituent part.
The automatic decompounding logic
If a dataset contains the individual words "dog" and "house", Relewise will identify these as existing atoms. If the dataset furthermore contains the word "doghouse", Relewise knows to decompound the word into its constituent parts automatically.
Preventing decompounding
The decompounding feature in Relewise can also help maintain compound words, in case the search function has erroneously split them up. In the case of boxershorts, you might not want the engine to treat them as shorts, since they are technically underwear. As such, you can inform the machine that this is one word and one word only, and thus prevent inaccurate matches in the search results. To prevent the innate decompounding engine in Relewise from splitting a word into its constituent parts, simply specify the word in the 'for word' section of the decompounding rule, and leave the 'Head' and 'Modifiers' fields blank.
Search Term Modifiers
Search Term Modifiers are a way for you to affect the way search queries are handled by the search engine in Relewise. Specifically, this lets you create modifiers for certain inputs, to either append to the term, remove from the term, add a word to the term, or replace the term altogether.
This is useful if you need to guide users towards more specific queries; for instance, "jorts" is a colloquial name for "jean shorts", but Relewise is unlikely to know this. By specifying a Search Term Modifier for jorts
, you may present your users with results for jean shorts
or denim shorts
(or both) instead.
Use With Caution!
Be aware that these rules are very powerful, and may have unintended side-effects if applied carelessly. Ensure that you are making the correct differentiation between "equals" and "contains", for instance, since an incorrectly applied filter could result in the rule affecting otherwise healthy search queries.
Example of a Search Term Modifier
Search Result Modifiers
Search Result Modifiers allow you to modify the search results of a given term before it is returned to you. This lets you, for instance, remove all search results that do not match a given category or brand.
You can read more about Search Result Modifiers, and how to use them, here.
Use With Caution!
Be aware that these rules are very powerful, and may have unintended side-effects if applied carelessly. Ensure that you are making the correct differentiation between "equals" and "contains", for instance, since an incorrectly applied filter could result in the rule affecting otherwise healthy search results.
Example of a Search Result Modifier