This topic describes how to use the query analysis feature based on the fuzzy query feature and how to configure an intervention dictionary. This topic also comprehensively describes the scenarios and search syntax of these features. This helps you gain a better understanding of these features.
Scenarios
If the performance of the fuzzy query feature cannot meet your business needs and an unexpected result is returned, you can use the query analysis feature based on the fuzzy query feature. However, take note that the fuzzy query feature increases the number of results that are retrieved in an inaccurate way and that the indexes for the fields of the SHORT_TEXT type cannot be used for the analysis of fuzzy queries. You can perform the following steps to create multiple fields of different types and configure multiple indexes for different analyzers:
Note:
The stop word filtering feature is unavailable.
Procedure
1. On the Instance Management page, find the application that you want to configure and click Details. On the page that appears, click Modify Offline Application.
2. Add multiple fields that you want to query and click Next. In this example, the brand field is of the SHORT_TEXT type and the brand_text field is of the TEXT type. Both fields are mapped to the brand field in the data source.
3. On the Index Schema page, create the brand index that corresponds to the brand field. Set the Analysis Method parameter to Fuzzy Analyzer. Create the brand_text index that corresponds to the brand_text field. Set the Analysis Method parameter to Chinese General. Then, click Next.
4. On the Data Source page, click Edit. In the dialog box that appears, configure the brand and brand_text fields that map to the brand field in the data source. Configure the mappings between the newly created fields in the application schema and the fields in the data source. Then, click Completed. 5. After the offline version is created and the state of the application becomes Normal, you can configure a query analyzer.
6. In the Edit Rule dialog box, select Synonym as Enabled Features and specify an intervention dictionary. 7. After the configurations are complete, create an intervention entry for synonym configuration to test the performance.
8. The following two figures show the returned results with and without the brand_qp parameter.
query:brand_text:'soso' OR brand:'soso'
Without the brand_qp parameter:
With the brand_qp parameter: