Closed missinglink closed 2 years ago
Ah yeah, much better!
Pretty wild the hoops you have to jump through to properly quote, my initial version of this just removed the characters that the query didn't like 😆.
Yeah its weird, MATCH
expects an FTS query as its right operand, and that query language has its own quoting rules.
On top of all that are the quoting rules when binding query variables, it all ends up a bit convoluted, I remember looking into it a while back and I'm pretty confident that this is correct, despite being a bit weird looking.
There appears to be a bug when using the token count query with reserved tokens such as
#
. This PR wraps that query in the same way we wrap the other ones to it can accept any characters as input.