OpenSearch includes a built-in stop word dictionary that filters out common words during query processing. When the built-in dictionary misclassifies a word—either filtering a term that should match, or passing through a term that should be ignored—create an intervention dictionary to override the default behavior.
How it works
An intervention dictionary contains entries that each define a stop word and an intervention type:
| Intervention type | Effect |
|---|---|
| Add | Marks a word as a stop word. The word is excluded from retrieval. |
| Block | Overrides a built-in stop word. The word is included in retrieval. |
When to use Add: A word appears in queries but never differentiates results. For example, in an e-commerce shopping guide app, the word "has" in the query "Hainan has bananas" is grammatical filler—adding it as a stop word ensures retrieval focuses on "Hainan" and "bananas".
When to use Block: A term in your domain matches a built-in stop word, but it carries real meaning. If a built-in stop word is filtered by default and returns results that ignore the term entirely, blocking it forces OpenSearch to include the term in retrieval so users get accurate results.
OpenSearch applies the built-in dictionary and your intervention entries together. When you enable stop word filtering in a query analysis rule, the built-in stop word dictionary is automatically selected alongside any intervention dictionaries you attach.
Prerequisites
Before you begin, ensure that you have:
An OpenSearch application with query analysis rules configured
Access to the OpenSearch console
Create an intervention dictionary
In the OpenSearch console, go to Search Algorithm Center > Retrieval Configuration.
On the Basic Configuration page, click Dictionary Management in the left pane.
Click Create in the upper-left corner.
Enter a name for the dictionary.
Set Dictionary Type to Stop Word.
Click Save.
The dictionary appears in the dictionary list.
Add intervention entries
Find the dictionary in the list and click Manage Entries in the Actions column.
Click Add Intervention Entry.
In the Add Intervention Entries panel, enter the stop word in the Stop Word column.
Select Add or Block in the Intervention Type column.
Click Save.
Repeat for each word you want to intervene on. Each entry must use a unique stop word.
Entry constraints:
| Constraint | Value |
|---|---|
| Stop words per entry | 1 |
| Entries per dictionary | 500 |
| Normalization | Uppercase converted to lowercase; full-width characters converted to half-width |
Apply the dictionary to a query analysis rule
Go to the Query Analysis Rule Management page.
Open an existing rule or create a new one.
Associate the intervention dictionary with the rule.
Save the rule without publishing it to the online application yet.
Test and publish
Run a search test against the offline application before applying the rule to the online environment. Verify that the results reflect the expected stop word behavior.
For example, if you added "has" as a stop word, searching for "Hainan has bananas" should return all documents containing "Hainan bananas"—not just documents containing the exact phrase "Hainan has bananas".
After confirming the results, publish the rule to the online application.
Example
Scenario: An e-commerce shopping guide app returns few results when users search for "Hainan has bananas". The word "has" is not recognized as a stop word, so OpenSearch only retrieves documents containing the exact phrase.
Solution: Add "has" as a stop word in an intervention dictionary, then attach the dictionary to the query analysis rule used by the online application.
Procedure:
Go to Search Algorithm Center > Retrieval Configuration > Dictionary Management and click Create.

Name the dictionary and set Dictionary Type to Stop Word.

Click Manage Entries for the new dictionary. In the Add Intervention Entries panel, set Stop Word to
hasand Intervention Type to Add, then click Save.
On the Query Analysis Rule Management page, click Create and attach the dictionary to the rule. Do not publish the rule yet.

Run a search test. Searching for "Hainan has bananas" now returns all documents containing "Hainan bananas".
Publish the rule to the online application.
Limits and usage notes
| Item | Detail |
|---|---|
| Intervention dictionaries per account | 20 |
| Stop words per entry | 1 (each entry must use a unique stop word) |
| Entries per dictionary | 500 |
| Normalization | Uppercase converted to lowercase; full-width characters converted to half-width |
| Dictionary name and type | Cannot be changed after creation |
| Shared dictionaries | One dictionary can be used by multiple query analysis rules |
| Built-in dictionary | When stop word filtering is enabled in a rule, the built-in stop word dictionary is automatically applied |
| Deleting a dictionary | Cannot delete a dictionary attached to any query analysis rule (online or offline). Detach it from all rules first |