title: MongoDB: Text search (exact match) using variable
body: <p>MongoDB 3.4<br/><br/>
  I have a value in a variable. val1 = "Fort Minor"<br/><br/>
  I need to search in a collection stores (with text index on name field) with documents as<br/></p>
  
  <pre><code>db.stores.insert([
       { _id: 1, name: "Java Hut", description: "Coffee and cakes" },
       { _id: 2, name: "Burger Buns", description: "Gourmet hamburgers" },
       { _id: 3, name: "Coffee Shop", description: "Just coffee" },
       { _id: 4, name: "Fort Coffee", description: "Discount clothing" },
       { _id: 5, name: "Java Shopping", description: "Indonesian goods" }
  ])
  </code></pre>
  
  <p><br/>
  when I text search the collection using the variable</p>
  
  <pre><code>db.City.find({$text:{$search: val1}})
  </code></pre>
  
  <p>it returns the _id : 4 document, since it contains Fort.
  <br/></p>
  
  <p>I need to do an exact match but using the variable.</p>
  
  <p>The above search should return only when val1 = "Fort Coffee"</p>