OpenSearch Industry Algorithm Edition for education
Configuration procedure
1. In the OpenSearch Industry Algorithm Edition console, go to the Instance Management page and click Create Instance.
2. On the buy page, set the product edition to "Industry Algorithm Edition" and the industry type to "Education". Based on your business requirements, set the cluster preference to "Exclusive cluster - General-purpose/Compute-optimized/Storage-optimized". Other configuration items are the same as those for the general-purpose edition.
3. After you complete the purchase, confirm the order:
On the order confirmation page, check the configuration details (region, application name, edition type, industry type, purchased specifications, storage capacity, computing resources, and so on). After you confirm the fee information, select Terms of Service and click Activate Now.
4. After the activation succeeds, go to Application Management > Application List, find the application, and click Configure.
Then, configure the application by performing the following steps in sequence: Select Features --> Application Schema --> Index Schema --> Data Source --> Complete:
(1)Select Features: Set the vertical to "Question Search". Select the template features as needed (all are selected by default). Then, click Next.
The template features include query analysis (education-specific word package), sort policy (education-specific sort policy), and drop-down suggestions.
(2) Application schema: This section uses manual creation as an example. After you complete the configuration, click "Next":
The primary table is automatically generated when you create the application and cannot be manually created. The console only allows you to add secondary tables.
Set the table name to main and set it as the primary table. Add the following fields: id (INT type, set as the primary key), title (TEXT type, with the field label set to Question Title), content (TEXT type, with the field label set to Question Content), and desc (LITERAL type). Set the corresponding field label for each field. Note: Field labels are used to quickly generate the industry-enhanced index schema, query analysis rules, and sort policies. Make sure that you add field labels to the corresponding fields in the application schema.
(3) Index schema:
This page contains two tabs: Default Text Index and Vector Index. You must set the index label, included fields, and analysis method for each index. You must also set the corresponding fields in the Attribute Fields list and the Default Display Fields list. Then, click Next.
Note: Index labels are used to quickly generate query analysis rules and sort policies. Make sure that you add index labels to the corresponding indexes in the index schema. The mappings are as follows: 1. The fields configured as Question Title, Question Content in the application schema must be set as a composite index with the "Default Text Index" index label, and the analysis method must be set to "Industry - Education Question Search". 2. The field configured as Question Title in the application schema must be given the "Vector Index" index label, and the analysis method must be set to "Vector - Education Vector K12".
(4) Data source: OpenSearch currently supports the following cloud data sources: RDS, MaxCompute, POLARDB.
Note: You can also upload data to OpenSearch by using the API.
(5) Complete the configuration:
After the configuration is complete, the page displays The industry-enhanced application is configured. Next, you can: 1. Configure query analysis by using the query analysis feature package of the selected industry template. 2. Configure a sort policy by using the selected sort policy model. 3. Configure and use the drop-down suggestions feature. Click Back to Application List to return to the Application Management page.
Query testing
Search testing
After the index is built, you can test the index that corresponds to the industry text analyzer of the Industry Algorithm Edition for education on the Extended Features > Search Test page: Enter a query clause in the query field, configure the clauses and parameters, and then click Search to view the returned results.
For the default index, enter the following query clause: default:'education'
Vector retrieval
To test the vector retrieval feature, perform the following steps:
1. On the Search Algorithm Center > Retrieval Configuration > Query Analysis Configuration page, configure the text vectorization feature in the sys_default query analysis that is generated by default by the industry template:
Click the sys_default query analysis to edit it. In the Add Rule dialog box, make sure that the industry type is Education, select Text Vectorization in the feature selection section, and then click OK to save the settings.
2. On the Extended Features > Search Test page, add fixed parameters for testing:
Required parameters
-
query=default:'education'
-
qp=sys_default
-
raw_query=education
Note:
-
The vector index takes effect only after you configure the text vectorization feature of query analysis.
-
The index for which query analysis is configured must use "Industry - Education Question Search", the industry must be set to "Education", and in the text vectorization feature, you must select the analyzer configured with "Vector - Education Vector K12".
Multi-channel retrieval
By default, the Industry Algorithm Edition for education generates a multi-channel search policy named sys_strategy for your instance. To test the multi-channel search feature, configure specific parameters on the Extended Features > Search Test page. The parameters are as follows:
Required parameters
-
query=default:'education'
-
qp=sys_default
-
raw_query=education
-
search_strategy=sys_strategy
Usage notes
-
An application of the general-purpose edition can be converted to an application of the Industry Algorithm Edition, but an application of the Industry Algorithm Edition cannot be converted to an application of the general-purpose edition.
-
"Vector - Education Vector K12" cannot be used alone. It takes effect only after you configure the text vectorization feature of query analysis for an index that uses "Industry - Education Question Search".
-
The Industry Algorithm Edition for education applies only to applications in exclusive clusters.
-
If you want the system to automatically generate vectors for a field, set the field to the TEXT type when you add it, and set the index type to "Vector - Education Vector General" or "Vector - Education Vector k12" when you configure the index.
-
In the application schema, you must add the field names that correspond to the field labels. Otherwise, an error is reported.
If field labels are not set correctly, the system displays a dialog box with the message Select the required field labels. Click OK to go back and complete the settings.
-
In the index schema, you must add the index names that correspond to the index labels. Otherwise, you cannot proceed to the next step.
For example, if the index label of the Vector Index is displayed as Select (not set), the Next button cannot be clicked. You must select the correct index label before you can continue.