added document to explain $regex. $type and $exists