All Products
Search
Document Center

OpenSearch:Run search tests

Last Updated:Feb 03, 2023

After the data source is configured, you can start to search for data. The OpenSearch console provides the Search Test page for you to run search tests. You can configure clauses and parameters to search for data. You can configure a search test for search requests based on your business requirements. For more information, see API operations, SDK for Java, and SDK for PHP.

The following part describes how to run a search test on the Search Test page in the OpenSearch console. To run a search test on the Search Test page, click the Plus icon next to Clauses or Parameters, select a clause or parameter that you want to use from the drop-down list, specify the content of the clause or parameter, and then click Search.

Procedure

1. Log on to the OpenSearch console. In the left-side navigation pane, choose Feature Extensions > Search Test. On the Search Test page, enter a QUERY clause. This step is required.

image

2. Add more clauses or parameters as required.

image

image

3. View the results of a search test.image

Clauses

For more information about how to use QUERY clauses, see QUERY clauses.

For more information about how to use FILTER clauses, see FILTER clauses.

For more information about how to use SORT clauses, see SORT clauses.

For more information about how to use DISTINCT clauses, see DISTINCT clauses.

For more information about how to use AGGREGATE clauses, see AGGREGATE clauses.

For more information about how to use KVPAIR clauses, see KVPAIR clauses.

For more information about how to use CONFIG clauses, see CONFIG clauses.

Parameters

Displayed Field - fetch_fields: sets the fields to be displayed. Separate multiple fields with semicolons (;).

Query Rule - qp: sets the name of the query analysis.

Query Policy: sets the query policy. Set this parameter as required.

Rough Sort Expression - first_rank_name: sets the name of a rough sort.

Fine Sort Expression - second_rank_name: sets the name of a fine sort.

Search Result Summary Configuration - summary: configures the summary of search results. For more information, see Process search queries.

Category Prediction - category_prediction: sets information about the category prediction. For more information, see Process search queries.

Raw Query - raw_query: sets the original keyword in a query clause.

New-search Policy - re_search: sets a re-search policy. For more information, see Process search queries.

Business Information - biz and User ID - user_id: set business information and the user ID. For more information, see Process search queries.

Search ReqId - from_request_id: sets the request ID of a search request.

User ID - user_id: sets the user ID on the search application side.

A/B Test - abtest: sets the name of an A/B test.

Disabled Field - disable: disables one or more fields. Example: disable = qp. For more information, see Process search queries.