- Integrate the Search Interface in an Existing Page
- Disable the Coveo for Sitecore Reverse Proxy
- Alter Search Results Before They Are Displayed in a Search Interface
- Add User Identities to a Search Request
- Route Search Queries to Query Pipelines
- Apply Filtering and Ranking Rules
- Remove Filtering on the Current Sitecore Context Database
- Display External Content in a Search Interface
Display External Content in a Search Interface
In addition to the items of your Sitecore Content Tree, a search interface built with Coveo for Sitecore components can return results coming from external systems.
Coveo Cloud offers a large array of connectors. These connectors and their deployment guides are listed under Connector Directory.
Once you have indexed your external content, you can include that content in a Coveo for Sitecore search interface.
Enabling the External Source in Sitecore
This section assumes that you have already indexed an external source in the Coveo Platform (see Index External Content).
After having indexed your external source in the Coveo Platform, you need to enable it in Sitecore.
To enable the external source
In the Sitecore Experience Editor, open your Coveo-powered search page (or search results page, if you’re redirecting searches from a global search box).
Select the Coveo Search Interface component.
In the floating toolbar, select Edit the rendering’s data source. It should be the leftmost option in the toolbar.
In the External Content section, type the name of your external source.
Save and publish your item. Your external source is now enabled.
Depending on the filtering you have set up (e.g., in the Coveo Search Interface component data source, in the Coveo Tab component data sources, or in a targeted Query Pipeline), documents from your external source may or may not appear in search results.
In the Coveo Search Interface component data source, you have added a
where the item has layout query filter rule. Because this rule pertains specifically to Sitecore items, external content items don’t meet that rule and are filtered out of the search results.
If all your external source documents are being filtered out of the search results unwantedly, you need to adjust your filtering rules (see Adjusting Filtering Rules to Include External Content in Search Results).
Adjusting Filtering Rules to Include External Content in Search Results
You might face a situation where your external content documents are unwantedly being filtered out of search results. You might also need to specify only one or a few external sources to be included in your search results. In both cases, you need to adjust your filtering to include a rule that uses the Coveo for Sitecore
Documents from an external source aren’t appearing in your search results when viewing a tab you labeled
All Content, in your search page. You want your search results to include external source documents. You have an Enterprise Cloud Coveo for Sitecore license and have isolated the issue to be the
where the item has layout query filter rule set in the
All Content tab data source.
To display external source documents in your
All Content tab search results
In the Experience Editor, select the All Content tab component.
In the floating toolbar of the selected component, select Edit the rendering’s data source. It should be the leftmost option in the toolbar.
In the Query Filter section, under Filter expression rules, add the rule
or where source field is equal to <NAME_OF_YOUR_EXTERNAL_SOURCE>.
Save your changes.
- Open your
Coveo.SearchProvider.Custom.configfile in a text editor.
- Locate the
Within this element, add the following patch to change the
isSourceSpecificattribute value on the
sourcefield name to
<fieldType fieldName="source" > <patch:attribute name="isSourceSpecific" value="false" /> </fieldType>
If you don’t set the
sourcefield name to
isSourceSpecific="false", the field name
sourceyou specified in your filtering rule is translated in the advanced query (
aq) parameter of the search API call, as illustrated below.
Having the field name you specified translated this way makes your
orfiltering rule ineffective.
Refresh your search page in the Experience Editor. When viewing the
All Contenttab, you should now have results coming from your external source.
- Publish your search page.
Adding External Fields
External fields are Coveo fields that aren’t found in Sitecore, such as:
Fields in sources non-related to Sitecore.
Coveo system fields.
When adding external fields on Sitecore items:
fieldMapsection of the
Coveo.SearchProvider.Custom.configfile (see About the Coveo Search Provider Configuration File).
externalFieldsnode, add the field name in that following format
Save the file.
With this setting, you may now use these fields in Coveo for Sitecore facets, result templates, sort components, filtering/boosting rules.
Using External Content with Sitecore Facets
Coveo will index Sitecore fields based on your selection in the Fields section of the Coveo Command Center. These fields are extracted from the Sitecore templates, which means that if you plan to create facets to filter using these fields, it will only affect the Sitecore content where it was extracted.
This page explains the steps to populate a field on content external to the Sitecore instance where the field was extracted.
Step 1: Verify That the Field Doesn’t Already Exist in Your Sources
To prevent overwriting an existing field, you need to verify if it already exists in your sources.
In the Coveo Administration Console, go to Content > Content Browser.
Choose one of your external items, and click on Properties.
Under Fields, verify that your Sitecore field doesn’t already exist on the item.
Step 2: Adding the Field Name to Your External Content
You now need to add the Sitecore field to your external content. This is done using source mapping explained in the Manage Source Mappings page.
Once the mapping is in place and the external source rebuilt, both Sitecore and external content should have a value for this field, allowing you to filter and boost on it.