$url="http://localhost:9200/{$indexName}/_search?"; $params=[ 'size'=>$count, 'source'=>json_encode(['query' => [ 'multi_match' => [ 'query' => $keyword, 'fields' => ['title', 'content'] ] ]]), 'source_content_type'=>'application/json', ]; $ret=json_decode(file_get_contents($url.http_build_query($params)),true);