All Products
Search
Document Center

OpenSearch:Query tests

Last Updated:Aug 27, 2024

After you deploy a cluster, you can log on to the OpenSearch Retrieval Engine Edition console and run query tests. When you run a query test, you can specify various query clauses in a query request based on your business requirements.

Procedure

  1. Log on to the OpenSearch Retrieval Engine Edition console. In the left-side navigation pane, click Instance Management. On the Instance Management page, find the instance that you want to manage and click Manage in the Actions column.

    image.png

  1. On the page that appears, choose Extended Features > Query Test in the left-side pane. On the Query Test page, select SQL Query, Havenask Query, or REST API Query from the drop-down list, add query clauses based on your business requirements, and then click Search. The results that meet the specified query conditions are displayed.

    image.png

Havenask query

If you select Havenask Query from the drop-down list, the query and Clauses fields appear. You must enter a query statement in the query field, and specify the config and cluster clauses. You can add other clauses to retrieve data based on your business requirements.

image.png

Results of a sample Havenask query

image.png

SQL query

If you select SQL Query from the drop-down list, the query and Clauses fields appear. You must enter a query statement in the query field. Then, click Search.

You can specify the kvpair clause to retrieve data based on your business requirements.

image.png

Results of a sample SQL query

image.png

RESTful API query

If you select REST API Query from the drop-down list, select an index table from the Index Table drop-down list, enter a query statement in the left-side SQL editor, and then click Search.

image.png

The results of a RESTful API query are displayed in the right-side section.

image.png

{
  "query": "index_id:12"
}

Query syntax