title: How to query one field then order by another one in Firebase cloud Firestore?
body: <p>I'm struggling to make a (not so) complex query in firebase cloud firestore.</p>
  
  <p>I simply need to get all docs <code>where</code> the <code>id</code> field  <code>==</code> a given id.</p>
  
  <p>Then order the results by their <code>date</code> and limit to 10 results.</p>
  
  <p>So this is my current situation </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>db.firestore().collection('comments')
          .where("postId",'==',idOfThePost)
          .orderBy('date','asc').limit(10).get().then( snapshot =&gt; {
             //Nothing happens and the request wasn't even been executed
           })</code></pre>
  </div>
  </div>
  </p>
  
  <p>I can get the result only if i don't use the <code>orderBy</code> query but i have to  process this sorting for the needs of my application.</p>
  
  <p>Someone has an idea to help me to fix this ?</p>
  
  <p>thanks</p>