Gravatar for

Question by Wim Nijmeijer, Jun 19, 2017 11:56 AM

HTML Processor and personalisation


Assume we have personalized pages with different content rendered based upon the current profile. But we want to use the HTML processor to index the complete page. Can we do that? If so how?



2 Replies
Gravatar for

Answer by Martin Laporte, Jun 19, 2017 12:00 PM

I think your best bet would be to index multiple copies of the documents, one for each profile.

Gravatar for

Answer by Jean-François L'Heureux, Jun 19, 2017 1:28 PM

@Martin Laporte is right. The `HtmlContentInBodyWithRequestsProcessor` will only index the version of the page without personalization. Indexing personalized versions can be hard as there are so many personalization rules outside of profiles. It can lead to an explosion of indexed versions.

If you have to do it, you would have to create an additional processor to be placed before the `HtmlContentInBodyWithRequestsProcessor`. This new processor would take the original document to index, and create personalized variants with each their own unique clickableUri. These URI, when visited, should render the personalized page. These variants need to be added to the array of items to index in the `coveoPostItemProcessingPipeline` pipeline.

Then, you also have to add a way to identify which indexed document belongs to which profile and filter accordingly at query time to only return documents personalized for the current profile or no profile at all.

This is a complex project!

Gravatar for

Comment by Wim Nijmeijer, Jun 22, 2017 6:32 AM

ok. Thanks this explains a lot. When using HTMLContentProcessors would we loose the security from Sitecore on it? Because the guide says that the content must be available anonymously...

Ask a question