Syntax error. Need help to understand

Let’s create a simple index:

create table testrt (field text);
insert into testrt (field) values('some...string...with...dots');

Now execute these queries:

select * from testrt where match ('@field (some...)'); - will return the document without errors
select * from testrt where match ('@field (e...)'); - will return no documents without errors

select * from testrt where match ('@field (...)'); - will return syntax error
ERROR 1064 (42000): index testrt: syntax error, unexpected ')' near '...)'

Is this a normal behavior or it is a bug?

You can get the same error using ` symbol instead of dot.

Well charset_table wouldnt contain dot. The default one certainly doesnt.

So really you inserted, as though dots concatenated as a speeator

values('some string with dots');

So match ('@field (some...)') becomes match ('@field (some)')
and can match a word

And ‘match (’@field (e…)’)’ becomes match ('@field (e)')
There is no ‘e’ as a wholeword, so no results.

But match ('@field (...)') collapses to effectively match ('@field ()')
which is an error, because the brackets are empty.

Adding dot to charset_table would help.
But would also need to min_infix_len to get part word matches. As ‘some…string…with…dots’ would be indexed as one long word, and so part words wouldnt match by default.
And maybe expand_keywords if dont wnat to add *'s yoursefl.