Coveo for Sitecore: Configure an External Source Tab without Sitecore Items
Coveo for Sitecore (Coveo Hive) comes with an out-of-the-box Coveo Tab component that can be useful for switching between different types of Sitecore content, but lacks a direct way within Sitecore to only show External Content without Sitecore content.
If you’re team is lucky enough to have the Enterprise version, then you may be able to get away with adding a rule within the Coveo Tab Datasource field Filter expression rules
, but the rule “where specific field compares to specific value” doesn’t allow you to make a blanket statement rule to not inlude a document that contains a field, which is enough to keep Sitecore documents out of the mix.
A solution I recommend (for both Pro and Enterprise) is to use a Pipeline Advanced Filter. The Datasource for Coveo Tab contains the field Names of external content sources
that will append external coveo sources from your organization to the Coveo API call. It also contains the field Pipeline
for determining which Query Pipeline you would like the request to filter through within the Coveo Admin Portal. The following steps should be taken:
-
Add all of your external source names from the Coveo Portal to the field
Names of external content sources
: -
Create a new Pipeline in Coveo Portal that your external sources will flow through and paste that Pipeline name into the
Pipeline
field: -
Within the Coveo Portal, double-click on the created external source Pipeline and navigated to the
Advanced
tab and stay on the right-rail Filters section. Click on theAdd rule
button and add a new cq (constant query) parameter with the expressionNOT @alltemplates
. The condition section can be left empty since we never want to include Sitecore documents. The@alltemplates
field is specific to Sitecore documents, but feel free to use any other field if your external source meta data has created this field: