Skip to content

Instantly share code, notes, and snippets.

@vtml
Last active April 11, 2023 05:04
Show Gist options
  • Save vtml/97877e183fa16b7da3464aa4a767ad82 to your computer and use it in GitHub Desktop.
Save vtml/97877e183fa16b7da3464aa4a767ad82 to your computer and use it in GitHub Desktop.
Coveo Configuration for Sitecore SXA Multi Site with Docker Containers
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:env="http://www.sitecore.net/xmlconfig/env/" xmlns:role="http://www.sitecore.net/xmlconfig/role/" xmlns:coveo="http://www.sitecore.net/xmlconfig/coveo/">
<sitecore role:require="Standalone or ContentManagement or ContentDelivery" coveo:require="!disabled">
<settings>
<!--
From https://github.com/Sitecore/Sitecore.Demo.Platform/blob/main/src/Foundation/CoveoIndexing/code/App_Config/Include/Foundation/Foundation.CoveoIndexing.config.demo
Coveo for Sitecore back-end code tries to issue HTTPS requests to the CM at the end of a rebuild to validate items are searchable and deleted from the index.
This does not work inside the Docker container network which only has HTTP endpoints.
We disable committed and deleted documents polling to solve this issue.
-->
<setting name="Coveo.Indexing.CommittedDocumentsPollingEnabled" value="false" />
<setting name="Coveo.Indexing.DeletedDocumentsPollingEnabled" value="false" />
<setting name="Coveo.Indexing.AuthenticationHeader.Name" value="x-coveo-authentication-token" />
<setting name="Coveo.Indexing.AuthenticationHeader.Value" value="ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890" env:require="LOCAL" />
<setting name="Coveo.Indexing.AuthenticationHeader.Value" value="#{Coveo.Indexing.AuthenticationHeader.Value}" env:require="!LOCAL" />
</settings>
<pipelines>
<coveoPostItemProcessingPipeline>
<processor type="CPA.Foundation.Coveo.Processors.coveoPostItemProcessingPipeline.FixPageLinkUrisPostItemProcessing, CPA.Foundation.Coveo" patch:before="*[@type='Coveo.SearchProvider.Processors.ExecuteGetBinaryDataPipeline, Coveo.SearchProviderBase']"/>
</coveoPostItemProcessingPipeline>
</pipelines>
<pipelines role:require="Standalone or ContentManagement">
<coveoInboundFilterPipeline>
<!-- Used to exclude items that don't have layouts from being indexed -->
<processor type="Coveo.SearchProvider.CoveoInboundFilters.HasLayoutInboundFilter, Coveo.SearchProviderBase">
<ApplyToPaths>/sitecore/content</ApplyToPaths>
</processor>
</coveoInboundFilterPipeline>
</pipelines>
</sitecore>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment