title: Storing an array of searchable values in MongoDB
body: <p>I need to store the role ID and role name in each document in my <code>Users</code> collection. I need to be able to say "Get Users that have xyz role" or "Get users that have a role who's name contains 'XYZ'", stuff like that.</p>
  
  <p>Is that even possible in Mongo?</p>
  
  <p>Right now, I'm storing data like this:</p>
  
  <pre><code>{
      "_id": {
          "$id": "4fe30e3db92f5d2a5c000000"
      },
      "alias": "rogue_coder",
      "display_name": "Rogue Coder",
      "email": "rogue@example.com",
      "roles": {
          "4fe30e5fb92f5d6f53000000": "Super Administrator"
      }
  }
  </code></pre>
  
  <p>With that, I can see if a user has a given role, but I can't get all users who have a role that contains the word "Super" for example. Any ideas on how to do this?</p>