Does anyone know a good resource with elasticsearch-php examples ideally covering queries taking MySQL Examples. I am struggling both with the code syntax and what to use when.
For example, I want to do a search where $name must be part of field 'business' and where 'country' matches $country
$params = [
'index' => 'xxxxx',
'type' => 'zzzzz',
'body' => [
'from' => 0,
'size' => $maxResults,
'query' => [
'bool' => [
'must' => [
'match' => ['name' => $searchString],
],
'must' => [
'match' => ['country' => $country],
],
],
],
],
];
The first 'must' seems to be completely ignored. Removing this will return exactly the same results.
I searched around for hours. There are plenty of quick beginner tutorials with simple search examples but I already get stuck one step further like with the above example
Thanks