Gravatar for jean-francois.hamel@ia.ca

Question by jfhamel, Oct 14, 2016 10:42 AM

URI resolving in a multi-site context for the HtmlContentInBodyWithRequestsProcessor

Since our pages are composed of content fetched from many items in Sitecore, we added the HtmlContentInBodyWithRequestsProcessor in the indexing pipeline (we did this so that we could have indexed in Coveo our complete pages, and not only parts of it).

It worked fine until we added other sites in Sitecore. For thses new sites, Coveo seems to have problems finding the right URIs to fetch the content of the pages for that site, resulting in the fact that none of the pages of this site are indexed.

I have read many questions asked and the answers you provided, and from what I understand, it is quite difficult for Coveo to determine the URI of an item/page at indexing time (as mentionned here https://answers.coveo.com/questions/7019/clickableuri-is-incorrect-resolveitemsiteprocessor-not-working )

So my question is : can the HtmlContentInBodyWithRequestsProcessor be made to work in a multi-site context?

What we are investigating right now is to add a processor just before to find the URI and set it in the arg, so that the HtmlContentInBodyWithRequestsProcessor can work with a valid URI. Is it a good approach?

We are using CES 7.0 (8047) and Coveo for Sitecore 7.5 v3.0 (1188), which I think are the December 2015 versions.

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Oct 14, 2016 2:02 PM

I think this is a good approach worth investigating.

As you may probably know, if an item is served by more than one site, Coveo indexes it only once. So if your rendering logic differs between sites, you will have only one indexed version.

At query time, Coveo resolves the right clickable URI of the search results so the ones that are served by the current site always have the correct URL.

Gravatar for ssartell@rightpoint.com

Comment by ssartell, Oct 14, 2016 2:59 PM

Don't know if this is relevant to your scenario, but I've had multiple issues come up due to custom LinkProviders that were relying on Sitecore.Context. The ResolveResultClickableUriProcessor which runs on the results of each query uses the link manager to set the clickUri on each result. But the Sitecore.Context.Site is actually the CoveoRest site and not whatever site you might expect. Use the options arguments instead to determine the context when creating links.

0 Reply
Ask a question