title: How to solve 'MongoError: $where is not allowed in this atlas tier'?
body: <p>I had the following query which was working in my local mongodb but when I switched to atlas, its giving me </p>
  
  <p>MongoError: $where is not allowed in this atlas tier</p>
  
  <p>I looked at similar post, but could not find answer</p>
  
  <pre><code>await Markertag.find( { $where: 'this.markerNum.toString().match(' + search.searchText + ')' }).distinct('photoId');
  </code></pre>