I am new to ElasticSearch and I am trying to query on multiple fields of a a nested document. It actually succeeds only when there is an exact match.
return Record::search()
->multiMatch([
'original_name',
'some_id',
'contributors.name',
'customNames.custom_name',
], ' * '.$searchTerm.' * ', ['fuzziness' => 'AUTO'])
->size(500)->get()->hits();
Any ideas?
SQL equivalent would be:
SELECT * FROM WHERE records LIKE '%'.$seachTerm.'%' (plus some extra joins)