Showing search suggestions
Sometimes you want to help your customers search better by suggesting other related searches. You have 4 sources of data for trying to help your customers improve their search query:
- Reflect automatic spell correction, if any was applied, so that they know that their search was corrected.
- Suggest alternative spellings
- Suggest related searches (merchandiser controlled)
- Suggest related searches (machine learning generated)
Autocorrect
If autocorrect was applied, the query will return:
correctedQuery
field- specify that an
autocorrect
rewrite was applied underrewrites
originalQuery
with the query before autocorrect
Let’s say my query
of egle
is autocorrected to eagle
.
JSON Reference:
{ "correctedQuery": "eagle",
"originalQuery": "egle",
"rewrites": [ "autocorrect" ] }
You can then use this information to render the corrected query to the customer. For example, you could show:
“You searched for egle
, but we found nothing so we searched for eagle
instead.”
This helps the customer be informed about why they see the results that they do.
Did You Mean (Automatic)
The engine will bring back alternative spellings to the query, based off your catalogue and fuzzy matching within 2 characters of what was typed in. The suggestions will come in order of strength, and are driven by which fields are marked as searchable. In other words: earlier keywords are more close in spelling to the typed in query and are more populated in your catalog.
These suggestions are returned in the response as an array, under didYouMean
.
If you intend to use Did You Mean to show suggested spelling, it is a best practice to ensure that your upload configuration file has the searchable fields that you’d like to use for Did You Mean generation listed in the start of the fieldDefinition
section of your upload configuration. In other words: put the more valuable fields earlier in the file.
The volume of the suggestions can be controlled via the Spell Suggestion Strength in Area Settings.
Adjust the slider to determine how precise spelling suggestions should be on misspelled terms. Setting a high suggestion strength would ensure that more suggestions for a misspelled term are suggested for searches, whereas lower settings will return fewer suggestions.
The automatically suggested alternative spellings will be returned with the response.
JSON Reference:
{ "didYouMean": [ "lion", "line" ] }
Related Queries via Command Center (Merchandiser Controlled)
You can use the Related Queries section to specify additional search terms that can be shown along side the main set of results. This is a manually populated section.
If you want to explicitly define some related queries, you can add them here. You can add multiple suggestions by separating them with a comma.
For example, cake can be related to fudge, sponge, cookie, biscuit, chocolate.
Multiple Related Query
or Search Term
can be entered using the following formatting.
Related Queries via Recommendations (Requires Integration)
If you are beaconing recommendations data you can integrate machine learning driven query terms. For example, you can show top trending searches in the customer’s area.
Please review with your Project Manager on the best path to integrate beaconing and the related queries. The integration path is client-specific, as your unique costumer patterns will drive the kind of integration you would do from the available options.