Gravatar for

Question by Matt, Jul 24, 2015 11:48 AM

Coveo for Sitecore generating fieldnames from the wrong fieldset

I have a multi-site instance of Sitecore, set up which includes one custom index for each site. Both indexes build and populate properly, including the creation of their own fieldsets. When using search on the non-default site, the return values from calls to ToCoveoFieldName are always showing the values for the fieldset associated with the default site. to draw it out; One instance has two sites, 'default' and 'other'. The 'default' fieldset has a hash of XXXXX The 'other' fieldset has a hans of YYYYY When using the 'other' site for search, fields added to the query using ToCoveoFieldName() always use the hash of XXXXX. I've confirmed the context site is indeed 'other' on the page used for search.

I'm hoping there's something I can do in my control to cause the ToCoeoFieldName() calls to use the hash associated with the context site.

1 Reply
Gravatar for

Answer by Sébastien Belzile, Jul 24, 2015 12:58 PM

This is because the field name translator translations are linked to the associated database. In other words, the translation goes like this, if you are in the web context, the fieldNameTranslator will look for the associated Coveo index (the index of your default website).

This is not the way to go when using Coveo For Sitecore. You should have one index for each of your database and filter results with the search component.

Here is a detailled answer that explains how to setup Coveo For Sitecore in a multi-site solution:

Ask a question