title: MongoDB 'unable to find index for $geoNear query'
body: <p>I'm just trying to get a simple <code>near</code> query working. Here's a sample of my document.</p>
  
  <pre><code>{"point": 
    {"type": "Point", 
       "coordinates": [30.443902444762696, -84.27326978424058]}, 
     "created_on": {"$date": 1398016710168}, 
     "radius": 180, 
     "user": {"$oid": "53543188eebc5c0cc416b77c"}, 
     "_id": {"$oid": "53544306eebc5c0ecac6cfba"}, 
     "expires_on": {"$date": 1399831110168}
  }
  </code></pre>
  
  <p>and with mongod I tried the command:</p>
  
  <pre><code>db.bar.find({point: {$near: [-84.26060492426588, 30.45023887165371]}});
  </code></pre>
  
  <p>but I get this error:</p>
  
  <blockquote>
    <p>error: {
            "$err" : "Unable to execute query: error processing query: ns=foo.bar skip=0\nTree: GEONEAR  field=point maxdist=1.79769e+308 isNearSphere=0  || First: notFirst: full path: point\nSort: {}\nProj: {}\n planner returned error: unable to find index for $geoNear query",
            "code" : 17007
        }</p>
  </blockquote>
  
  <p>Maybe my google fu is not so sharp today but I couldn't find anything. Also, I ran the ensure index command. My intention is that these are map locations.</p>
  
  <pre><code>db.bar.ensureIndex({a:1});
  db.bar.ensureIndex({geo:"2d"});
  </code></pre>