title: @Indexed on nested property not working in Spring-data for mongo
body: <p>I have the following object structure:</p>
  
  <pre><code>@Document(collection = "user")
  @TypeAlias("user")
  public class User {
      @Id
      private ObjectId id;
      private Contact info = new Contact();
  }
  </code></pre>
  
  <p>and here is the Contact pojo:</p>
  
  <pre><code>public class Contact {
      @Indexed(unique = true)
      private String mail;
  }
  </code></pre>
  
  <p>But for some reasons not known to me, I don't see Spring-data creating a unique index for the property <strong>info.mail</strong></p>
  
  <p>To summarize, I have this json structure of user object:
  <strong>{_id:xxxxx,info:{mail:"abc@xyz.shoes"}}</strong></p>
  
  <p>And I want to create a unique index on <strong>info.mail</strong> using Spring data with the above pojo structure. Please help.</p>