All Products
Search
Document Center

OpenSearch:Configure an application of the Industry Algorithm Edition for E-commerce

更新時間:Oct 18, 2024

Procedure

1. Log on to the OpenSearch console. OpenSearch Industry Algorithm Edition is displayed by default. In the left-side navigation pane, click Instance Management. On the Instance Management page that appears, click Create Instance.

image

2. On the buy page, set Commodity Edition to Industry Algorithm Edition and Industry Type to E-commerce, and set Cluster Preferences to Exclusive Cluster - General-purpose, Exclusive Cluster - Compute-optimized, or Exclusive Cluster - Storage-optimized based on your business requirements. Set the remaining parameters in the same way as you set those for Build an application.

en行业算法版购买.png

3. Click Buy Now and confirm the order.

4. After the instance is created, find the instance on the Instance Management page and click Configure in the Actions column. On the Configure Application page, perform the following steps in sequence to configure the application: Feature Selection, Application Schema, Index Schema, Data Source, and Complete.

(1) Select features.

image

The features fall into the following categories: Query Analysis, Sort Policy, and Other Services.

5

(2) Create an application schema.

You can create an application schema by using one of the following methods: Use Data Source, Manually Create, Import Template, and Use File. The following figure uses Use Data Source as an example to show how to create an application schema.

6

Note: Field tags are used to generate index schemas, query analysis rules, and sort policies for applications of the Industry Algorithm Edition. Make sure that each field tag is associated with a specific field in the application schema. For more information, see the preceding figure.

(3) Create an index schema.

7

Note:

  • Index tags are used to generate query analysis rules and sort policies. When you are configuring an application of the Industry Algorithm Edition for E-commerce for the first time, make sure that each index tag is associated with a specific index in the index schema. For more information, see the preceding figure.

  • Set Analysis Method to Vector - General E-commerce Vector for the index associated with the index tag Vector Index.

  • If you are not configuring an application of the Industry Algorithm Edition for E-commerce for the first time, you must add the e-commerce vector analyzer, and you do not need to configure the vector tag.

(4) Configure a data source. The following figure shows how to configure an ApsaraDB RDS for MySQL data source.

Set parameters for the data source.

8

Configure field mappings.

9

(5) Complete the configuration.

10

Tests

Search test

After the index schema is configured, choose Feature Extensions > Search Test in the left-side navigation pane. On the Search Test page, run a test based on the index that corresponds to the text analyzer of the application of the Industry Algorithm Edition for E-commerce.image

# The default index is used as an example. Enter the following query clause:
default: 'Beef' 

Vector search test

To test the vector search feature, perform the following operations:

1. In the left-side navigation pane, choose Search Algorithm Center > Retrieval Configuration. On the Retrieval Configuration page, click Query Analysis Rule Configuration. On the page that appears, enable the text vectorization feature in the default query analysis rule sys_default.image

2. In the left-side navigation pane, choose Feature Extensions > Search Test. On the Search Test page, set the required parameters to perform a test.image

# Required parameters
query=default: 'Beef'
qp=sys_default
raw_query=Beef 

You can view the vector results in the Query Analysis Process dialog box.image

Note:

  • The vector index takes effect only after you enable the text vectorization feature during query analysis rule configuration.

  • The analysis method of the indexes used in the query must be set to Industry - General Analyzer for E-commerce, the industry type must be Enhanced Query Analysis for E-commerce, and Vector - General E-commerce Vector must be selected for the vector index used for the text vectorization feature.

  • The Schema of the Industry Algorithm Edition for E-commerce:schemeDemo.json

Multimodal search test

By default, a multimodal search policy named sys_strategy is generated for an application of the Industry Algorithm Edition for E-commerce. To test the multimodal search feature, choose Feature Extensions > Search Test in the left-side navigation pane. On the Search Test page, set the required parameters. The following figure shows an example.image

# Required parameters
query=default: 'Beef'
qp=sys_default
raw_query=Beef
search_strategy=sys_strategy

Usage notes

  • Applications can be changed from General-purpose Edition to Industry Algorithm Edition, but cannot be changed from Industry Algorithm Edition to General-purpose Edition.

  • Industry Algorithm Edition is applicable only to dedicated cluster applications.

  • The index whose analysis method is Vector - General E-commerce Vector cannot be used alone. It takes effect only after you enable the text vectorization feature on the Query Analysis Rule Configuration page based on the indexes whose analysis method is Industry - General Analyzer for E-commerce.

  • Make sure that each field tag is associated with a specific field in the application schema. Otherwise, an error message is returned.

12

  • Make sure that each index tag is associated with a specific index in the index schema. Otherwise, you cannot proceed to the next step.

14