title: MongoDB combining find with text search
body: <p>I'm trying to filter a MongoDB collection with a <code>.find()</code> query and run a text search on the results to lower the cost of the query but I can't seem to be able to chain the commands.</p>
  
  <p>Here's what I've tried (that doesn't work):</p>
  
  <pre><code>db.jobs.find({
      "salary.max": {
          $gte: 50000,
          $lte: 120000
      }
  }).runCommand("text", {
      search: "metal"
  })
  </code></pre>
  
  <p>I've also tried the query in the reverse order, which defeats the purpose and doesn't work either.</p>
  
  <p>Is there a way to chain a <code>.runCommand()</code> to a <code>.find()</code> in MongoDB?</p>