normalize query syntax for /query route