We know the Boolean syntax of the MySQL built-in full-text parser. MySQL already supports it; there is no fun in reimplementing the same thing. To do something new we could make a parser that supports
AND, OR, and
NOT keywords, which is supposedly a more user-friendly syntax and our users may like it more than MySQL plus and minus prefixes.
How could our parser support such a syntax? It could, for example, by doing look-ahead, reading the next word before sending the current one to MySQL. If the next word is
AND, the current one must have
yesno=1. The idea is simple, but the devil, as always, is in the detail:
foo AND NOT barwe may need to look two words ahead. ...