--- title: Filter and boost using the Rule Set Editor slug: lb295252 canonical_url: https://docs.coveo.com/en/lb295252/ collection: coveo-for-sitecore-v5 source_format: adoc --- # Filter and boost using the Rule Set Editor > **Legacy feature** > > This article pertains to achieving relevance with the Coveo Hive framework. > Coveo Hive is now in maintenance mode. > > See [Achieve relevance](https://docs.coveo.com/en/n9qd0318/) for guidance on leveraging [Coveo Platform](https://docs.coveo.com/en/186/) relevance features with the Coveo Atomic library. [.version.no-link.c4sc.c4sc-edition.enterprise] Enterprise edition The **Rule Set Editor** lets you apply filtering at the search interface level or for a specific search interface tab. You can access the **Rule Set Editor** through the data source of the following Coveo for Sitecore renderings: * [Query Filter](https://docs.coveo.com/en/3038/) * [Query Ranking](https://docs.coveo.com/en/3039/) * [Coveo Search Interface](https://docs.coveo.com/en/3044/) * [Coveo Tab](https://docs.coveo.com/en/3066/) > **Leading practice** > > Although the **Coveo Search Interface** rendering view file automatically instantiates both a **Query Filter** and a **Query Ranking** rendering, you should insert standalone instances of these renderings in your search interfaces. > This eases the configuration and reusability of these renderings. ## Using the Query Filter Rendering You can apply filtering expressions to all your search interface queries by inserting the **Query Filter** rendering and editing its data source. . In the **Experience Editor**, locate and select the **UI Header** placeholder. When the **UI Header** placeholder is empty, the placeholder shaded area is visible (image below left). Otherwise, you can select a rendering that has been inserted in the **UI Header** placeholder and use the **Go to the parent component** option (image below right). ![Screenshot of the Sitecore Experience Editor showing the UI Header Add here placeholder button | Coveo](c4sc-v5/ui-header-placeholder.png) ![Screenshot of the Coveo for Sitecore Analytics component floating toolbar in the Sitecore Experience Editor and the Go to the parent button highlighted | Coveo](c4sc-v5/ui-header-placeholder-via-go-to-parent.png) . Click **Add here**. . Select the **Query Filter** rendering. ![Select a rendering | Coveo for Sitecore 5](https://docs.coveo.com/en/assets/images/c4sc-v5/select-query-filter.png) . Create a data source for your rendering. ![Create a data source | Coveo for Sitecore 5](https://docs.coveo.com/en/assets/images/c4sc-v5/query-filter-data-source-creation.png) . In the **Query Filter** rendering floating toolbar, select the **Edit the rendering's data source** option. It should be the leftmost option on the floating toolbar. . In the **Query Filter** section, just underneath **Filter expression rules**, click **Edit rule**. . Click **Add a new rule**. . In the **Choose conditions** section of the dialog, select the condition template you want to use (see [Rule Set Editor boosting and filtering rules reference](https://docs.coveo.com/en/2471/)). ![Select condition template | Coveo for Sitecore 5](https://docs.coveo.com/en/assets/images/c4sc-v5/filter-rule-template.png) . In the **Edit rule** section, for each link in the condition template, click the link to either toggle between possible options or to set a value (for example, clicking the `where` link will allow you to toggle between the `where` and `except where` options.) ![Clicking the where link | Coveo for Sitecore 5](https://docs.coveo.com/en/assets/images/c4sc-v5/filter-rule-change-value.png) . To add other conditions to your rule, repeat steps 7 to 9. You can change the `and` logical operator between the conditions, if need be. ![Add conditions to rule | Coveo for Sitecore 5](https://docs.coveo.com/en/assets/images/c4sc-v5/final-filter-rule.png) . Give your rule a meaningful name. ![Name the rule | Coveo for Sitecore 5](https://docs.coveo.com/en/assets/images/c4sc-v5/name-filter-rule.png) Once completed, the **Query Filter** rendering and its rule name should be displayed in the **Experience Editor**. ![Query filter displayed | Coveo for Sitecore 5](https://docs.coveo.com/en/assets/images/c4sc-v5/query-filter-added-experience-editor.png) When executing queries in a search interface, you can review your call headers in the browser developer tools to ensure that the advanced query (_aq_) value properly reflects your query filter rule. ![Reviewing headers | Coveo for Sitecore 5](https://docs.coveo.com/en/assets/images/c4sc-v5/query-filter-advanced-query-in-dev-tools.png) ## Using the Query Ranking Rendering You can boost the score of targeted results on all your search interface queries by inserting the **Query Ranking** rendering and editing its data source. . In the **Experience Editor**, locate and select the **UI Header** placeholder. When the **UI Header** placeholder is empty, the placeholder shaded area is visible (image below left). Otherwise, you can select a rendering that has been inserted in the **UI Header** placeholder and use the **Go to the parent component** option (image below right). ![Screenshot of the Sitecore Experience Editor showing the UI Header Add here placeholder button | Coveo](c4sc-v5/ui-header-placeholder.png) ![Screenshot of the Coveo for Sitecore Analytics component floating toolbar in the Sitecore Experience Editor and the Go to the parent button highlighted | Coveo](c4sc-v5/ui-header-placeholder-via-go-to-parent.png) . Click **Add here**. . Select the **Query Ranking** rendering. ![Select a rendering | Coveo for Sitecore 5](https://docs.coveo.com/en/assets/images/c4sc-v5/select-query-ranking.png) . Create a data source for your rendering. ![Create a data source | Coveo for Sitecore 5](https://docs.coveo.com/en/assets/images/c4sc-v5/query-ranking-data-source-creation.png) . In the **Query Ranking** rendering floating toolbar, select the **Edit the rendering's data source** option. It should be the leftmost option on the floating toolbar. . In the **Query Ranking** section, just underneath **Boost expression rules**, click **Edit rule**. . In the **Choose conditions** section, select the condition template you want to use. . In the **Edit rule** section, for each link in the condition template, click the link to either toggle between possible options or to set a value (for example, clicking the `where` link will allow you to toggle between the `where` and `except where` options.) ![Edit rule section | Coveo for Sitecore 5](https://docs.coveo.com/en/assets/images/c4sc-v5/query-ranking-condition.png) . To add other conditions to your rule, click **Add a new rule** and repeat steps 7 and 8. You can change the `and` logical operator between the conditions, if need be. . In the **Choose actions** section, select whether you want to boost (add number to document score) the targeted items or reduce the score (remove number from document score) of the targeted items. ![Boosting a rule | Coveo for Sitecore 5](https://docs.coveo.com/en/assets/images/c4sc-v5/boosting-rule.png) . In the **Edit rule** section, click the `number` link to specify the number of points to add to, or subtract from, the scores of the targeted items. . Give your rule a meaningful name. ![Name the rule | Coveo for Sitecore 5](https://docs.coveo.com/en/assets/images/c4sc-v5/boosting-rule-name.png) Once completed, the **Query Ranking** rendering and its rule name should be displayed in the **Experience Editor**. ![Query ranking displayed | Coveo for Sitecore 5](https://docs.coveo.com/en/assets/images/c4sc-v5/query-ranking-in-experience-editor.png) When executing queries in search interface, you can review your call headers in the browser developer tools to ensure that the advanced query (_aq_) value properly reflects your query ranking rule. ![Reviewing headers | Coveo for Sitecore 5](https://docs.coveo.com/en/assets/images/c4sc-v5/query-ranking-dev-tools-qre.png)