I master Elasticsearch on a php client.
How can I find a lot of documents in ES, by id, equivalently 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);
how to pull out a few records? Tried it, but it doesn't work.
$params = [[ 'index' => 'my_index', 'type' => 'my_type', 'id' => 'my_id' ], [ 'index' => 'my_index', 'type' => 'my_type', 'id' => 'my_id2' ]]; $response = $client->mget($params);
so
$params = [ 'index' => 'my_index', 'type' => 'my_type', 'id' => array('my_id','my_id2') ]; $response = $client->mget($params);
The PHP API has only https://www.elastic.co/guide/en/elasticsearch/client/php-api/2.0/_getting_documents.html
Here it is like it, only in the CURL request https://www.elastic.co/guide/en/elasticsearch/reference/1.4/docs-multi-get.html