title: MongoDb Spring data GeoNear query with max and min distance
body: <p>I am trying to implement <code>$near query</code> in spring data mongodb with <code>maxDistance</code> and <code>minDistance</code>. <code>NearQuery</code> has <code>maxDistance</code> but doesn't have <code>minDistance</code>. According to <a href="http://docs.mongodb.org/manual/reference/operator/query/near/#examples" rel="nofollow">mongodb explanation</a> it support <code>minDistance</code> with <code>maxDistance</code>. I could not find any sample code doing this in spring and could not see that in soring data mongodb api in spring.
  Furthermore, <a href="http://docs.mongodb.org/manual/reference/operator/query/nearSphere/#nearsphere" rel="nofollow">This doc</a> is also doing what I need and I dont know how to impelement <code>$nearSphere</code> in spring.</p>
  
  <pre><code> Point point = new Point(longitude, latitude);
   NearQuery nq = NearQuery.near(point).maxDistance(new Distance(2, Metrics.KILOMETERS));
  </code></pre>