November Happy Hour will be moved to Thursday December 5th.

Autocomplete on multisite

Vote:
 

Hello,

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

var result = this.findClient
	.Statistics()
	.GetAutocomplete(q);

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

Regards Niklas

#176345
Edited, Mar 16, 2017 14:05
Vote:
 

Have you tried adding a filter for the current site?

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

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?

#177129
Apr 04, 2017 11:45
Vote:
 

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.

#177266
Edited, Apr 06, 2017 13:49
Vote:
 

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
	.Statistics()
	.StatisticsAutocomplete(
		q, 
		4, 
		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

#177316
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.