--- title: Manage stop word rules slug: '3406' canonical_url: https://docs.coveo.com/en/3406/ collection: tune-relevance source_format: adoc --- # Manage stop word rules _Stop words_ are words that are filtered out of a [query](https://docs.coveo.com/en/231/) in order to give more importance to [keywords](https://docs.coveo.com/en/2738/). This provides users with more relevant search results. The stop word list for a [Coveo organization](https://docs.coveo.com/en/185/) [index](https://docs.coveo.com/en/204/) is empty by default, but with the [required privileges](#required-privileges), you can add stop word [rules](https://docs.coveo.com/en/236/) in the [Coveo Administration Console](https://docs.coveo.com/en/183/) to define words that should be ignored when they appear in user queries. Stop words are defined independently for each [query pipeline](https://docs.coveo.com/en/180/). Depending on your specific needs, you may want to add a list of words to ignore from queries. For instance, you might ignore industry-specific words that appear in many of your items and offer little differentiation between items in search results. **Example** On a medical website, words such as `cause`, `symptoms`, and `treatment` tend to appear frequently in articles across the site. These words are often used in queries but they don't help differentiate between articles on the site. You therefore create a stop word rule for each of these words. ![Coveo Platform | Stop word rule panel](https://docs.coveo.com/en/assets/images/tune-relevance/stop-word-panel.png) So when a user searches for `headache or migraine treatment`, the query sent to the index is `headache migraine`. The search results will be more relevant as the focus is on the keywords `headache` and `migraine` rather than the generic term `treatment`. > **Note** > > Query pipeline stop word rules aren't applied to the query that's used by [RGA](https://docs.coveo.com/en/nbtb6010/), [CPR](https://docs.coveo.com/en/oaie9196/), [SE](https://docs.coveo.com/en/nbtb0041/), and [Smart Snippet](https://docs.coveo.com/en/laea5490/) [models](https://docs.coveo.com/en/1012/). > These models always use the raw [basic query expression (`q`)](https://docs.coveo.com/en/178/) entered by the user without any transformations or modifications. ## Prerequisites Before creating a rule, make sure that you have the following: * Access to a search page You need access to a Coveo-powered [search interface](https://docs.coveo.com/en/2741/) to be able to test the [rule](https://docs.coveo.com/en/236/) that you create. * An existing query pipeline The queries from the search page must travel through a specific [query pipeline](https://docs.coveo.com/en/180/). * Required privileges You need specific [privileges to be able to add and edit rules in a query pipeline](#required-privileges). Once you meet these requirements, you can create a rule on the [**Query Pipelines**](https://platform.cloud.coveo.com/admin/#/orgid/search/pipelines/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/search/pipelines/)) page. To test the rule, [use the A/B test feature](https://docs.coveo.com/en/3255/) to compare the results of the rule with the results of the original pipeline. ## Order of execution The following diagram illustrates the [order of execution of query pipeline features](https://docs.coveo.com/en/1376/): ![Diagram showing order of execution | Coveo](https://docs.coveo.com/en/assets/images/tune-relevance/order-of-execution-query-pipeline-features.png) ## Access the "Stop words" subtab . On the [**Query Pipelines**](https://platform.cloud.coveo.com/admin/#/orgid/search/pipelines/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/search/pipelines/)) page, click the query pipeline you want to modify, then click **Edit components** in the Action bar. . On the page that opens, select the **Search terms** tab. . On the **Search terms** tab, on the left side of the page, select **Stop words**. ## Add or edit stop word rules . [Access the **Stop words** subtab](#access-the-stop-words-subtab). . Do one of the following: * To create a new rule, click **Add stop word rule**. * To edit an existing rule, select the rule you want to edit, and then click **Edit** in the Action bar. . In the **Add/Edit a stop word rule** panel, under **Stop words**, add or edit the words that will be ignored when they appear in queries. Type one or more words separated by commas. ![Coveo Platform | Comma-separated words in stop words panel](https://docs.coveo.com/en/assets/images/tune-relevance/stop-words-comma-separated.png) . Under **Condition (optional)**, do one of the following: * Click **Select a condition** and select a condition from the dropdown list. * Click **Create a new condition** to [create and associate a new condition](https://docs.coveo.com/en/1959#create-a-condition) with the rule. . Click **Add rule** or **Save**. Your rule is now active. ## Duplicate stop word rules You can duplicate stop word rules to use as a starting point for new rules within the same query pipeline. . [Access the **Stop words** subtab](#access-the-stop-words-subtab). . Select the rules you want to duplicate, and then click **Duplicate** in the Action bar. The duplicated rules appear at the bottom of the list. . [Edit](#add-or-edit-stop-word-rules) the duplicated rules as required. ## Change the order of stop word rules You can move stop word rules in the list to change the order in which they appear. > **Note** > > When you move a stop word rule, only the order of execution of stop word rules is adjusted. > Moving the rule doesn't affect the [order of execution](#order-of-execution) of stop word rules relative to other query pipeline components. . [Access the **Stop words** subtab](#access-the-stop-words-subtab). . Select the rule you want to move, and then click **Move up** or **Move down** in the Action bar to move the rule in the list. ## Copy stop word rules to another pipeline You can copy one or more stop word rules from one query pipeline to another. . [Access the **Stop words** subtab](#access-the-stop-words-subtab). . Select the rules you want to copy, and then click **...More** in the Action bar, and then click **Copy to**. . In the **Copy rule to another pipeline** panel, select the query pipeline to which you want to copy the rule, and then click **Copy**. The rule is copied to the selected query pipeline and is immediately active. ## Delete stop word rules . [Access the **Stop words** subtab](#access-the-stop-words-subtab). . Select the rules you want to delete, and then click **...More** in the Action bar, and then click **Delete**. . In the confirmation prompt, click **Delete**. Your deleted rules will stop being effective immediately in the target pipeline. > **Tip** > > * To avoid undesired search behaviors, delete unused query pipeline rules, as they can impact search relevance. > > * Consider using the [Groups & Campaigns feature](https://docs.coveo.com/en/3283/) to make query pipeline rules only apply for a specific time period. ## Leading practices When managing stop word rules, consider the following recommendations and tips: * The index assigns a semantic value to every word by considering their frequency in the index. Frequent words in indexed items are considered to carry less meaning. Consequently, the index already attributes minimal ranking weight for the occurrence of these words in search results. Therefore, add stop word rules only for specific use cases. > **Note** > > You might consider adding stop word rules to exclude bad keywords from queries to not impact the Coveo ML model learning process. > However, if end users perform queries containing only banned words, the model learning process could be affected depending on the returned search results. > > For more information on the management of the blocklist words, see [Blocklist](https://docs.coveo.com/en/l3od9093#blocklist). * Apply conditions Typically, stop word rules should only apply when a certain [condition](https://docs.coveo.com/en/2793/) is fulfilled. In general, you should associate the rule, and/or the query pipeline it's defined in, to a condition. Without a condition, the stop word rule would apply to all queries. * Consider using the Partial match feature: For implementations where users tend to enter lengthy natural language queries, using the [Partial match feature](https://docs.coveo.com/en/414/) can simplify search results by eliminating the need for exhaustive stop word definitions. This option lets you define a minimum number of keywords to be found in a search result before it's returned. As a result, the index favors the most important keywords and stop words become optional. * Consider how stop words affect ART models: When creating stop word rules, the words specified in the rule don't get passed to the ART models, which means that the [Automatic Relevance Tuning (ART)](https://docs.coveo.com/en/1013/) [models](https://docs.coveo.com/en/1012/) don't learn from these words and won't associate them with user interactions. However, it's important to note that these models also have their own stop word list that can be managed through the [Advanced model configuration API](https://docs.coveo.com/en/l3od9093#stop-words). These stop words help reduce the impact of common words when generating recommendations, however, a model only starts excluding them after accumulating sufficient interaction data. Therefore, regularly review ML model training data to ensure that stop word rules aren't adversely affecting the quality of the recommendations. * Test your stop words: When creating stop word rules, you should always [perform tests](https://docs.coveo.com/en/3407/) to ensure that your stop words don't negatively impact the search experience in cases other than the one you're trying to improve. ## Stop word special cases Stop word rules remove the specified words from queries only when they appear in combination with other keywords. They aren't removed when they're the only word in the query, because otherwise the removal could create an invalid expression. Coveo indexes all words contained in your source items, including the stop words. This allows Coveo to manage exceptions and keep stop words in the query in the following cases: * Stop words within a phrase search. **Example** A user is looking for an item that contains a very specific phrase and encloses the phrase between double-quotes in the search box: `"in the plan for year 2025"` The words `in`, `the`, and `for` are stop words, but since the phrase is enclosed in double-quotes, all keywords in this query are sent to the index, so only items containing these keywords in the same order and as contiguous occurrences are returned. * A query containing only stop words. **Example** A user searches for: `to be or not to be` If all the keywords of this query are stop words, they're all kept and sent to the index. * A stop word is an argument of the `NOT` or `NEAR` operators. **Examples** * A user searches for: `how NEAR:10 export`, meaning the user is looking for items containing both `how` and `export` occurring within ten words from each other. The word `how` has been set as a stop word. However, since it's an argument of the `NEAR` operator, it will be kept to return items containing both `how` and `export` within ten words from each other. * A user searches for: `(NOT how export)`, meaning the user is looking for items containing `export` but not `how`. The word `how` has been set as a stop word. If `how` is a stop word, because it's an argument of the `NOT` operator, and the `NOT` operator has precedence over the implicit `AND` operator, it will be kept to return items containing `export` but not `how`. * A stop word also has a plural form. **Example** An online store sells a variety of wristwatches. Since the majority of their products contain the word `watch` or `watches`, searching for these words doesn't provide relevant results, as customers are looking for either specific brands or types of watches. Therefore, you add both `watch` and `watches` to your stop words list to ensure that the search results are more relevant. You must add both forms since the plural form isn't automatically removed when the singular form is a stop word. ## Required privileges The following table indicates the [privileges](https://docs.coveo.com/en/1791#required-privileges) required to view or edit stop word rules. Learn more about the [Privilege reference](https://docs.coveo.com/en/1707/) or how to [manage privileges](https://docs.coveo.com/en/3151/). [cols="3",options="header"] |=== |Action |Service - Domain |Required access level |View stop word rules |Organization - Organization Search - Query pipelines |View .2+|Edit stop word rules |Organization - Organization |View |Search - Query pipelines |Edit |===