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?
I think your best bet would be to index multiple copies of the documents, one for each profile.
@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!