title: Compound index MongoDB
body: <p>I used MongoDb server version: 4.2.0.
  I have Compound index MongoDB:</p>
  
  <pre><code>db.fop.createIndex( { "id":1, "ADDRESS": "text"})
  </code></pre>
  
  <p>It works:</p>
  
  <pre><code>db.fop.find({"id":{$in:[1]},$text: {$search: "AnyTextSearch"}}, {score: {$meta: "textScore"}}).sort({score:{$meta:"textScore"}})
  </code></pre>
  
  <p>This does not work:</p>
  
  <pre><code>db.fop.find({"id":{$in:[1,2]},$text: {$search: "AnyTextSearch"}}, {score: {$meta: "textScore"}}).sort({score:{$meta:"textScore"}})
  </code></pre>
  
  <p>I get an error:</p>
  
  <pre><code>Error: error: {
      "ok" : 0,
      "errmsg" : "error processing query: ns=osint.fopTree: $and\n    id $in [ 1.0 2.0 ]\n    TEXT : query=AnyTextSearch, language=english, caseSensitive=0, diacriticSensitive=0, tag=NULL\nSort: { score: { $meta: \"textScore\" } }\nProj: { score: { $meta: \"textScore\" } }\n planner returned error :: caused by :: failed to use text index to satisfy $text query (if text index is compound, are equality predicates given for all prefix fields?)",
      "code" : 2,
      "codeName" : "BadValue"}
  </code></pre>
  
  <p>How to make the right request?</p>