--- title: Sitecore Instance Filter slug: '2192' canonical_url: https://docs.coveo.com/en/2192/ collection: coveo-for-sitecore-v5 source_format: adoc --- # Sitecore Instance Filter > **Legacy feature** > > The Coveo Hive Framework is now in maintenance mode and is no longer recommended for new implementations. > > To build new search experiences, use one of Coveo's more modern, lightweight, and responsive libraries. > To get started, see the [Build search](https://docs.coveo.com/en/2473/) article. ![Coveo for Sitecore Specific Rendering](c4sc-v5/sitecore-20-px-new.png) Implements the **CoveoForSitecoreLocalExpression** component which adds filters for the current Sitecore instance to the [constant query expression (`cq`)](https://docs.coveo.com/en/179/) of Search API calls. It registers a handler in the `onSitecoreContextInitialization` event triggered by the [CoveoForSitecoreExpressions](https://docs.coveo.com/en/2189/) component. [.version.c4sc.c4sc-new.5-0-822-2.October-30&-2020] [Coveo for Sitecore 5.0.822.2](https://docs.coveo.com/en/3360#release-notes) The new `Filter results based on the current Sitecore context database` option lets you control whether to add a filter on the current Sitecore context database in the `cq`. Prior to the October 30, 2020 release, search results and recommendations were automatically filtered on the current Sitecore context database using a `source==` filter in the [advanced query expression (`aq`)](https://docs.coveo.com/en/175/). ## Usage notes * The **{doctitle}** rendering is added automatically with the [Coveo Search Interface](https://docs.coveo.com/en/3044/) rendering. * {empty} -- [.version.c4sc.c4sc-new.5-0-822-2.October-30&-2020] [Coveo for Sitecore 5.0.822.2](https://docs.coveo.com/en/3360#release-notes) -- The **{doctitle}** rendering is now added automatically with the [Coveo Recommendations](https://docs.coveo.com/en/3042/) and [Coveo Related Query](https://docs.coveo.com/en/3043/) renderings. ## Insertion location

Coveo Hive

The Sitecore Instance Filter rendering is an Allowed Control in the following placeholder(s): Recommendations Components, Searchbox Components

Example insertion sequence for the Sitecore Instance Filter rendering.

Coveo Hive SXA

The Coveo for Sitecore SXA Sitecore Instance Filter rendering is meant to be inserted in specific placeholders (that is, Recommendations Components, Searchbox Components).

Example insertion sequence for the Sitecore Instance Filter rendering.
## Data source options The following table lists the available data source options for this rendering. [%header,cols="33%,66%"] |=== |Option name |Description a|{empty} -- [.version.c4sc.c4sc-new.5-0-822-2.October-30&-2020] [Coveo for Sitecore 5.0.822.2](https://docs.coveo.com/en/3360#release-notes) -- Filter results based on the current Sitecore context database |Defines whether to include a filter such that only items from the current Sitecore context database will be included in query results or recommendations. Disabling this option automatically disables the other Sitecore-specific filters below. |Filter Sitecore results on the current context language |Defines whether to include only Sitecore items in the current context language in query results or recommendations. |Filter Sitecore results on the latest version |Defines whether to include only the latest version of Sitecore items in each language in query results or recommendations. |=== ## Sample Generated HTML and Corresponding Results ```html
``` **Search API call `cq`:** ![Sitecore instance filter cq value | Coveo for Sitecore 5](https://docs.coveo.com/en/assets/images/c4sc-v5/sitecore-instance-filter-sample-cq.png) **Query Results:** ![Sitecore instance filter sample results | Coveo for Sitecore 5](https://docs.coveo.com/en/assets/images/c4sc-v5/sitecore-instance-filter-sample-output-results.png)