title: Return random document from collection MongoDB and Spring
body: <p>I have a  Mongo database and now I'm trying to return a random document from collection but I have a problem, my current method is returning same document twice while I want to avoid it.</p>
  <p>Imagine I have collection with titles like this:</p>
  <p><code>Barcelona, Rome, Milano, Madrid</code></p>
  <p>But I'm getting those titles likes this:</p>
  <p><code>Barcelona, Rome, Milano, Rome, Madrid</code></p>
  <p>I have this in my repository and this is actually Query to return me a random document based on type of adventure holidays</p>
  <pre><code>@Query(value = &quot;{typeOfAdventureHolidays: ?0}&quot;, count = true)
  long countAdventureHolidaysByTypeOfAdventureHolidays(String typeOfAdventureHolidays);
  </code></pre>
  <p>How to solve this? I tried to find at least any kind of solution but no success.</p>