次のように始まる単語を検索する MariaDB フルテキスト クエリを実行できます。
select * from mytable
where match(mycol) against ('+test*' in boolean mode)>0.0;
これは、「test」、「tester」、「testing」などの単語を検索します。
検索文字列に特殊文字が含まれている場合、検索文字列を引用符で囲むことができます。
select * from mytable
where match(mycol) against ('+"test-server"' in boolean mode)>0.0;
これにより、string を含むすべての行が検索されますtest-server
。
しかし、両方を組み合わせることができないようです:
select * from mytable
where match(mycol) against ('+"test-serv"*' in boolean mode)>0.0;
これにより、エラーが発生します。
Error: (conn:7) syntax error, unexpected $end, expecting FTS_TERM or FTS_NUMB or '*'
SQLState: 42000
ErrorCode: 1064
引用符で囲まれた文字列に '*' を配置すると、(予想どおり) 結果が返されません。
select * from mytable
where match(mycol) against ('+"test-serv*"' in boolean mode)>0.0;
これがMariaDBの制限であるかどうかを知っている人はいますか? それともバグ?
私のMariaDBのバージョンは10.0.31です