title: $cond is not allowed in this atlas tier
body: <p>I have to perform a search only when a condition is satisfied in the aggregate pipeline in mongoose</p>
  <pre><code> const products = await this.product.aggregate([
        {&quot;$cond&quot;:[request.query.search!=undefined,
          { $match: { $text: { $search: request.query.search } } }
        ]},
        //other aggregate operators
  ]);
  </code></pre>
  <p>Currently, it's saying $cond is not allowed in this atlas tier But I have to di it only in the aggregate pipeline. Any idea how I can do this?</p>