Harness the Elasticsearch client in php. How can I find a lot of documents in the ES, for id,'s equal to "WHERE id IN (1,2,3,4,9)" in SQL? For mono get I do so
$ params = [
'index' => 'my_index',
'type' => 'my_type',
'id' => 'my_id'
];
$ response = $ client-> get ($ params);
how to get some records? I tried so, but it does not work
$ params = [[
'index' => 'my_index',
'type' => 'my_type',
'id' => 'my_id'
]
[
'index' => 'my_index',
'type' => 'my_type',
'id' => 'my_id2'
]];
$ response = $ client-> mget ($ params);
and so
$ params = [
'index' => 'my_index',
'type' => 'my_type',
'id' => array ('my_id', 'my_id2')
];
$ response = $ client-> mget ($ params);
The API is PHP has only https: https://www.elastic.co/guide/en/elasticsearch/client/php-api/2.0/_getting_documents.html
That's kind of it, only CURL request https: https://www.elastic.co/guide/en/elasticsearch/reference/1.4/docs-multi-get.html
Who worked with ES, help please!)