besides escaping the query to avoid exception, I'm now making sure the user query matches exactly to the rules query field to make sure no other rules with similar queries could match.