title: Will aggregation pipeline use index for derived field?
body: <p>In aggregation pipeline I have this:-</p>
  
  <pre><code>  {
      "$project" =&gt; {
        account_name_i: { "$toLower" =&gt; "$account_name" },
      }
    }
  
    {
      "$sort" =&gt; {
        account_name_i: 1
      }
    }
  </code></pre>
  
  <p>and I have index <code>{ account_name: 1 }</code></p>
  
  <p>My Question is will $sort use index on account_name? If no, there is any other way we can achieve this in aggregation pipeline?</p>