title: WHERE clause Azure CosmosDB Mongo subdocument
body: <p>Using Azure CosmosDB Mongo.</p>
  
  <p>I have text fields in documents and subdocuments. Which I want be able to search.</p>
  
  <p>Using <code>Contains</code> works fine on the parent document properties. But doesn't seem to look at children at all. And doesn't even return any error.</p>
  
  <p><strong>Document:</strong>   </p>
  
  <pre><code> {
       "TextField1": "this will be found in search",
       "Comments": [{
           "Comment": "amazing post, let's see if this can be foundtoo",
       }, {
           "Comment": "thanks",
       }]
   }
  </code></pre>
  
  <p><strong>Search:</strong></p>
  
  <pre><code>var postFilter = Builders&lt;MyObject&gt;.Filter.Where(p =&gt; p.TextField1.ToLowerInvariant().Contains(searchText.ToLowerInvariant())) |
                   Builders&lt;MyObject&gt;.Filter.Where(p =&gt; p.Comments.Any(pc =&gt; pc.Comment.ToLowerInvariant().Contains(searchText.ToLowerInvariant())));
  
  var posts = await Posts.Find(postFilter).ToListAsync();
  </code></pre>
  
  <p>If I use the above code with search "found". It will return the document.</p>
  
  <p>If I use it with search "foundtoo". It will not return anything.</p>
  
  <p>PS: I have tried using <code>Text</code> and it is not supported and comes back as an error.</p>