How to fire multiple queries in elasticsearch using PHP. I can't find any example of msearch in php so anyone can help me how to use msearch.
svarup (Svarup) #1
polyfractal (Zachary Tong) #2
msearch endpoint under the root client object:
$client->msearch([ 'body' => [ [ 'index' => 'indexA', 'type' => 'typeA'], [ 'query' => [ 'match_all' => (object), ], ], [ 'index' => 'indexB', 'type' => 'typeB' ], [ 'size' => 0, 'query' => [ 'match_all' => (object), ], 'aggs' => [ 'max_sequence' => ['max' => ['field' => 'sequence']], ], ], ], ]);
svarup (Svarup) #3
Thank you sir.
polyfractal (Zachary Tong) #4
Happy to help!
system (system) #5
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.