I'm able to do it by using this mongodb native query:
db.books.aggregate(
[ { $sample: { size: 15 } } ]
)
But how to do it in spring-data-mongodb ?
I found no similar operation in Aggregation class of Spring Aggregation Framework
I'm able to do it by using this mongodb native query:
db.books.aggregate(
[ { $sample: { size: 15 } } ]
)
But how to do it in spring-data-mongodb ?
I found no similar operation in Aggregation class of Spring Aggregation Framework