DuncanWilder / BooleanSearchParser

A way to translate Boolean Search logic into MySQL Fulltext Parameters
The Unlicense
6 stars 3 forks source link

Protect against rouge asterisks #3

Open DuncanWilder opened 8 years ago

DuncanWilder commented 8 years ago

An asterisk at the end of a phrase ("security engin"*) will cause MySQL to throw an error

An asterisk by itself (this AND * AND that) will cause MySQL to throw an error

Proposed solution: Merge asterisk against last word if not an operator

this * AND that => this* AND that

Otherwise, remove the asterisk altogether this AND * AND that => this AND AND that