Added query operation type requirements on where clauses and fixed a bug with regex rules.