- 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 Rules
- Remove Filtering on the Current Sitecore Context Database
- Display External Content in a Search Interface
- Get Smart Snippets for Sitecore Content
Remove Filtering on the Current Sitecore Context Database
Coveo for Sitecore is designed to index Sitecore XP and XM instance items. Indexing Sitecore instances using Coveo for Sitecore typically produces two sources (two Sitecore sources to be more accurate) in your Coveo organization index, one source for your Sitecore
master database items, and the other for the
web database items.
By default, search interfaces assembled in the Sitecore Experience Editor using Coveo for Sitecore Hive renderings only display results from the current Sitecore context database. Hence, when editing a Coveo-powered search interface in the Experience Editor, the result list shows only items from the
master Sitecore source, whereas the published search interface shows only results from the
web Sitecore source.
The Sitecore Instance Filter adds a
source==<SITECORE_SOURCE_NAME> filter in Search API calls. Given
<SITECORE_SOURCE_NAME> represents a Sitecore source, all items from non-Sitecore sources in your Coveo organization aren’t included in Search API call responses. As a result, Sitecore XC content (which you must not use Coveo for Sitecore to index) isn’t included by default in Coveo for Sitecore search interfaces built in Sitecore.
Solutions for Querying Over External Source Content
There are different ways you can make a Coveo for Sitecore search interface query over external source content:
You can use the External Content rendering to explicitly specify the external sources that you want to query over, in addition to the source associated with the current Sitecore context database.
Coveo for Sitecore (October 30, 2020) You can disable the filtering based on the current Sitecore context database.
The focus of this article is to explain the latter.
Disabling Filtering on the Sitecore Context Database
As stated before, the Sitecore Instance Filter rendering adds a filter on the
source field such that only content from the source associated with the current Sitecore context database is returned on Search API calls. In old versions of Coveo for Sitecore, this filtering was hard-coded in the Sitecore Instance Filter rendering. However, the October 30, 2020 release of Coveo for Sitecore introduced a new
Filter results based on the current Sitecore context database option in the Sitecore Instance Filter data source, which now lets you control whether you want to filter on the current Sitecore context database.
The Sitecore Instance Filter rendering is embedded in the Coveo Search Interface rendering. Hence, you can disable the
Filter results based on the current Sitecore context database option in the Coveo Search Interface data source, which also automatically disables the other Query Filter section filters below it.
The following renderings also embed the Sitecore Instance Filter:
Coveo Related Query
The data source of these two renderings also expose the
Filter results based on the current Sitecore context database option. You can therefore disable filtering on the current Sitecore context database for Coveo Recommendations and Coveo Related Query results the same way you do on the Coveo Search Interface rendering.