title: Sort and distinct in mongoose
body: <p>My mongoose query is:</p>
  
  <pre><code>Spread.find(findCase).where('loc').near({
          center: {
              type: 'Point',
              coordinates: [self.lon, self.lat]
          },
          maxDistance: distance
  }).sort({ts : -1}).distinct("postId").exec();
  </code></pre>
  
  <p>So I get the error:</p>
  
  <pre><code>Error: sort cannot be used with distinct
  </code></pre>
  
  <p>But if I pass the query with console</p>
  
  <pre><code>db.spreads.distinct({}).sort({ts: -1});
  </code></pre>
  
  <p>That is ok.</p>
  
  <p>So why mongoose doesn't let me to select distinct and sort in one query and how can I do it?</p>