Answer the question
In order to leave comments, you need to log in
How to make a Multy get fetch from Elasticsearch php?
Hello!
I am learning Elasticsearch on php client.
How can one find multiple documents in ES, by id, equivalent to "WHERE id IN (1,2,3,4,9)" in SQL?
For mono geta I do this
$params = [
'index' => 'my_index',
'type' => 'my_type',
'id' => 'my_id'
];
$response = $client->get($params);
$params = ;
$response = $client->mget($params);
$params = [
'index' => 'my_index',
'type' => 'my_type',
'id' => array('my_id','my_id2')
];
$response = $client->mget($params);
Answer the question
In order to leave comments, you need to log in
https://github.com/elastic/elasticsearch-php/blob/...
$params = [
'index' => 'my_index',
'type' => 'my_type',
'body' => [
'ids' => [1, 2, ...]
]
];
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question