I'm trying to find a way where I can build my $params
array using the native syntax to search for a post which name is equal to 'test':
$params = [
"index" => "post_index",
"type" => "post",
'body' => [
'query' => [
'match' => [
'name' => 'test'
]
]
]
];
$result = $finder->find($params);
Unfortunately I'm getting this error:
Unknown key for a VALUE_STRING in [index].
I know that I can use some Elastic\Query\Match
to build my query.
Just I fixed my $params array this way :
$q = [
'query' => [
'match' => [
'title' => 'test'
]
]
];