Stop word intervention dictionary

Updated at:

Usage

You can manually apply interventions to the system's built-in stop word dictionary. This process typically involves the following four steps:

  1. Create a stop word intervention dictionary. In the console, go to Search Algorithm Center > Recall Configuration > Dictionary Management, open the query analysis intervention dictionary page, and click Create in the upper-right corner. Select a dictionary type and enter a name. The new dictionary appears in the dictionary list.

  2. Add and manage entries in the intervention dictionary. After creating the dictionary, click its name or Entry Management in the list to open its details page. You can add and manage entries there. Two intervention types are available: Add a stop word, which excludes a matching segmented query term from retrieval; and block a stop word, which allows a matching segmented query term to participate in retrieval normally.

  3. Use the intervention dictionary. After you create and populate the stop word intervention dictionary, you can apply it to a query analysis rule in any application.

  4. Test and deploy the intervention dictionary. Before you apply a query analysis rule that uses an intervention dictionary to your online environment, test its search performance to ensure the intervention results meet your expectations.

Example

Scenario: An e-commerce shopping guide service uses a query analysis rule with the stop word feature enabled in its OpenSearch application. However, you find an issue in the online environment and decide to use an intervention dictionary to resolve it.

Bad case: A user searches for the query "bananas from Hainan", but few results are returned because the field content only contains the keywords "Hainan" and "banana".

Troubleshooting: One reason is that the character "the" in the query is not recognized by the system as a stop word.

Solution: Create a new stop word intervention dictionary, add "the" as a stop word, and then apply the dictionary to the online query analysis rule.

Procedure:

1. In the console, go to Search Algorithm Center > Retrieval Configuration > Dictionary Management and create a stop word dictionary.

Enter a Name and select "Stop Word" as the Dictionary Type.

222. In the new stop word intervention dictionary, add an intervention entry. For example, enter “the” in the Stop Word field and select Add as the intervention type:

33

3. On the query analysis page, apply the newly created stop word intervention dictionary to a non-production query analysis rule to test its search performance.

4

4. Test the search feature to see if it provides the expected results. You will find that a search for "bananas of Hainan" retrieves the result "Hainan bananas" as expected:

6

Usage notes

  • The dictionary type and name cannot be modified after creation.

  • The stop word must be unique within the intervention list.

  • You can use a single intervention dictionary in multiple query analysis rules.

  • Intervention dictionaries patch the system's built-in dictionary. Therefore, when you use an intervention dictionary, the option to use the system's built-in dictionary is enabled by default.

  • You cannot delete an intervention dictionary if it is used by any query analysis rule, regardless of whether the rule is in a production environment. To delete the dictionary, you must first remove its association from all rules.

Limitations

  • You can create a maximum of 20 stop word intervention dictionaries.

  • You can add only one stop word per intervention entry.

  • Each stop word dictionary can contain a maximum of 500 intervention entries.

  • Stop word intervention entries take effect by matching the items that are generated after word segmentation. For example, if you add "please" as a stop word, when you query "which face cream is best please", the term "please" will not be used for retrieval.

  • The system normalizes all intervention content, converting uppercase letters to lowercase and full-width characters to half-width characters.