I have problem when search full text search.
1.First, when I search key have no unicode character, it return exact result.
$type = 'text';
$pattern = 'okman';
$nodes = Node::query()->whereRaw(" MATCH(pattern) AGAINST('$pattern') AND type = '$type' ")->get($columns);
The logged query
select * from bot_nodes where MATCH(pattern) AGAINST('okman') AND type = 'text'
2.Then when I search key have unicode character, it return empty result.
$type = 'text';
$pattern = 'nghỉ đi';
$nodes = Node::query()->whereRaw(" MATCH(pattern) AGAINST('$pattern') AND type = '$type' ")->get($columns);
The logged query:
select * from bot_nodes where MATCH(pattern) AGAINST('nghỉ đi') AND type = 'text'
.
But when I copy the above query, and paste it to navicat to run, it return exact query.
I already set charset and collation is utf8mb4
in database.php.
Please help me, thank you.