Using multiple types or indexes in Elasticsearch php API -
i want query multiple types , indices using elasticsearch php api. don't know how. should pass array of types , indices $params
? :
$params['index'] = $index;//array of indices $params['type'] = $types;//array of types $params['body'] = $q;//query body //request elasticsearch matched documents $results = $client->search($params);
you add them string $params
:
$params['index'] = "index1,index2";//array of indices $params['type'] = "type1,type2";//array of types $params['body'] = $q;//query body //request elasticsearch matched documents $results = $client->search($params);
Comments
Post a Comment