title: How do I run a geospatial query in Mongo?
body: <p>In the docs, it says that by default, Mongo treats it as lat/long:</p>
  
  <blockquote>
    <p>By default, the index assumes you are
    indexing latitude/longitude and is
    thus configured for a [-180..180]
    value range.</p>
  </blockquote>
  
  <p>So, let's say I have this in my document:</p>
  
  <pre><code>post['loc'] = [ -40.234, 56.222]
  db.mycollection.save(post)
  </code></pre>
  
  <p>I ensure my index:</p>
  
  <pre><code>db.mycollection.ensureIndex({"loc":"2d"})
  </code></pre>
  
  <p>Now, how do I execute the following in Mongo?</p>
  
  <ul>
  <li>Give me all documents that are within 5 miles of a certain lat/long</li>
  <li>Give me all documents within 400 meters of a certain lat/long</li>
  </ul>