Our monthly Virtual Happy Hour is happening this week, Fri Feb 23!

Try our conversational search powered by Generative AI!

Autocomplete on multisite



I´m doing this on a multisite and getting the same result on all sites:

var result = this.findClient

Is there any way or any workaround to separate autocomplete for the sites?

Regards Niklas

Edited, Mar 16, 2017 14:05

Have you tried adding a filter for the current site?

.Filter(x => x.SiteId().Match("MySiteId"))
Mar 24, 2017 10:30

The Filter extensions are built on the ITypeSearch interface. Not on the IClient or IStatisticsClient interface.

How can I vote for a multisite autocomple functionality?

Apr 04, 2017 11:45

Hi Niklas,

I haven't tried this myself but you can supply Tags with the Autocomplete API. See .Autocomplete() and .StatisticsAutocomplete() - it's more obvious there.

Only tag I've used is language but I think there should also be a siteid tag.

Edited, Apr 06, 2017 13:49

Good input dada.

I tested it and first impression is that it is working. This is how the working code looks like:

var result = this.findClient
		new[] { SiteDefinition.Current.Id.ToString() });

I also have to do this to synch the tracking:

typeSearch = typeSearch
	.Track(new[] { SiteDefinition.Current.Id.ToString() });

It´s a pity though the GUI doesn´t implement this tag feature. All manually added autocomplete words will apply on all sites in a multisite solution :(

Regards Niklas

Apr 07, 2017 9:30
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.