Using multiple types or indexes in Elasticsearch php API
You just add them as a string to $params
:
$params['index'] = "index1,index2";// a comma-separated list of index names, without any extra space$params['type'] = "type1, type2";//array of types$params['body'] = $q;//query body//request elasticsearch for matched documents$results = $client->search($params);