title: Spring boot / mongo wont create index with the index annotation
body: <p>I have the following:</p>
  
  <pre><code>@Document(collection = "linkmetadata")
  public class LinkMetaData {
  @Indexed(unique = true)
  private String url;
  ...
  }
  </code></pre>
  
  <p>But whenever it creates the collection it doesn't create any index for the url field, it's like it just ignores the annotation. Any idea why this is?</p>
  
  <p>Edit: no index is created upon insertion of data either. And when I try to fetch data for a specific url it throws an error that the url key is not unique if I entered the same url twice, but it doesn't care about inserting the unique key since there is no index..</p>