Improved Avatar::byPrefix to handle multiple-word queries