Quantcast
Channel: Using Optimizely Platforms
Viewing all articles
Browse latest Browse all 8020

Autocomplete - filter suggestions based on Market

$
0
0

On a multisite installation running both CMS and Commerce, I am performing the following code to filter search suggestions on site ID and language:

SearchClient.Instance.Statistics().Autocomplete(query, 10, new[] { $"siteid:{SiteDefinition.Current.Id.ToString()}", $"language:{currentCulture.TwoLetterISOLanguageName}" });

However, seeing as some languages have more than one market (e.g. Dutch (nl-NL) for The Netherlands and Belgium) this results in suggestions which are meant for e.g. the (Dutch language) Belgian website are showing up on the Dutch website.

I would like to be able to filter the suggestions on market as well as site ID and language, to enable differing suggestions for (e.g.) nl-NL and nl-BE. Is there any specific method to approach this, or perhaps a workaround to separate autocomplete per market?

Thanks in advance for any help.


Viewing all articles
Browse latest Browse all 8020

Trending Articles