use Elasticsearch\ClientBuilder; $client = ClientBuilder::create() ->setHosts(['localhost:9200']) ->build(); $searchQuery = [ 'index' => 'products', 'body' => [ 'query' => [ 'match' => [ 'product_name' => 'iPhone' ] ] ] ]; $searchResult = $client->search($searchQuery);In this example, we are using the ElasticSearch ClientBuilder package library to create a new instance of the search engine. We then specify the hostname and port of the ElasticSearch server and build the client. We then define a search query that specifies the index to search (in this case, the 'products' index) and the search parameters (in this case, searching for the term 'iPhone' in the 'product_name' field). Finally, we execute the search by calling the `search` method on the client object with the search query as a parameter. The result is returned in the `$searchResult` variable. In summary, the Search newInstance method is used to create a new instance of a search engine using a particular package library. The example above uses the ElasticSearch package library to search for products containing the term 'iPhone'.