title: Random documents from MongoDB using spring-data
body: <p>I'm able to do it by using this <a href="https://docs.mongodb.org/master/reference/operator/aggregation/sample/" rel="nofollow">mongodb native query</a>:</p>
  
  <pre><code>db.books.aggregate(
     [ { $sample: { size: 15 } } ]
  )
  </code></pre>
  
  <p>But how to do it in <code>spring-data-mongodb</code> ?</p>
  
  <p>I found no similar operation in <a href="http://docs.spring.io/spring-data/mongodb/docs/current/api/org/springframework/data/mongodb/core/aggregation/Aggregation.html" rel="nofollow">Aggregation class</a> of <a href="http://docs.spring.io/spring-data/mongodb/docs/current/reference/html/#mongo.aggregation" rel="nofollow">Spring Aggregation Framework</a></p>