title: Mongo Java Driver searching by text index
body: <p>In mongo's java driver I am using $text then $search to find things in a document however, this seems to not always yield the right results such as sometimes it will return items that don't have the searched for string. Is there a reason for this?</p>
  
  <p><strong>ANSWER</strong></p>
  
  <p>You can just escape the string and mongo won't use the delimiters. Example:</p>
  
  <p><code>{"$text" : {"$search" : "\"&lt;insert term here&gt;\""}}</code></p>