找不到任何示例如何使用https://github.com/ongr-io/ElasticsearchDSL向查询结果添加亮点
<?php
require 'vendor/autoload.php'; //Composer autoload
$client = ClientBuilder::create()->build(); //elasticsearch-php client
$matchAll = new ONGR\ElasticsearchDSL\Query\MatchAllQuery();
$search = new ONGR\ElasticsearchDSL\Search();
$search->addQuery($matchAll);
//How to highlight results in title field?
$params = [
'index' => 'your_index',
'body' => $search->toArray(),
];
$results = $client->search($params);