All Products
Search
Document Center

SearchClient

Last Updated: Sep 09, 2021

Overview

The SearchClient class is used to implement the search feature for an application, for example, to obtain search results based on specified keywords and filter conditions.

Constructor

Method definition

void  OpenSearch\Client\SearchClient::__construct( $openSearchClient)

Parameter description

Parameter

Type

Description

$openSearchClient

\OpenSearch\Client\OpenSearchClient

The OpenSearchClient object. The OpenSearchClient class is a basic class that can be used to calculate signatures, interact with servers, and return the results.


execute

Runs a query and returns matched data based on the query conditions.

Method definition

\OpenSearch\Generated\Common\OpenSearchResult     OpenSearch\Client\SearchClient::execute( $searchParams)

Parameter description

Parameter

Type

Description

$searchParams

\OpenSearch\Generated\Search\SearchParams

The query conditions.