The Search Test page in the OpenSearch console lets you run ad-hoc queries against your data source—without writing any code. Use it to validate clauses and parameters before wiring them into your application or API calls.
For production integration, see SDK for Java and SDK for PHP.
Prerequisites
Before you begin, ensure that you have:
Configured at least one data source for your OpenSearch application
Run a search test
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 is the only required clause.

Click the Plus icon next to Clauses or Parameters to add more clauses or parameters. Select a clause or parameter from the drop-down list, then specify its value.


Click Search to run the test and view the results.

Clauses
The QUERY clause is required. All other clauses are optional and can be added using the Plus icon.
| Clause | Required | Reference |
|---|---|---|
| QUERY | Yes | QUERY clauses |
| FILTER | No | FILTER clauses |
| SORT | No | SORT clauses |
| DISTINCT | No | DISTINCT clauses |
| AGGREGATE | No | AGGREGATE clauses |
| KVPAIR | No | KVPAIR clauses |
| CONFIG | No | CONFIG clauses |
Parameters
All parameters are optional. Add them using the Plus icon next to Parameters.
| UI label | Parameter | Description |
|---|---|---|
| Displayed field | fetch_fields | Fields to display in results. Separate multiple fields with semicolons (;). |
| Query rule | qp | Name of the query analysis configuration to apply. |
| Query policy | *(none)* | Query policy to apply. Set as needed. |
| Rough sort expression | first_rank_name | Name of the rough sort configuration. |
| Fine sort expression | second_rank_name | Name of the fine sort configuration. |
| Search result summary configuration | summary | Summary configuration for search results. See Process search queries. |
| Category prediction | category_prediction | Category prediction settings. See Category prediction overview. |
| Raw query | raw_query | Original keyword passed in the query clause. |
| New-search policy | re_search | Re-search policy to apply. See Process search queries. |
| Business information | biz | Business context information. See Process search queries. |
| User ID | user_id | User ID from the search application side. See Process search queries. |
| Search ReqId | from_request_id | Request ID of the search request. |
| A/B test | abtest | Name of the A/B test configuration to apply. |
| Disabled field | disable | Field to disable. For example: disable = qp. See Process search queries. |