Boolean query optimizer, take one.