title: EWS search using querystring with quotes not working for exchange 2016
body: <p>The application i work uses EWS with querystring to search for emails within a folder. When i specify  querystring like Subject:&quot;New York&quot;, it does not return any emails which has subject &quot;New York Jets&quot; or &quot;New York Mets&quot;. It will only return emails with exact match, like &quot;New York&quot;. This works fine searching against office365, but not Exchange 2016. Does anyone know why it does not work as described in following article: <a href="https://docs.microsoft.com/en-us/exchange/client-developer/exchange-web-services/how-to-perform-an-aqs-search-by-using-ews-in-exchange" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/exchange/client-developer/exchange-web-services/how-to-perform-an-aqs-search-by-using-ews-in-exchange</a></p>
  <p>My function code:</p>
  <pre><code>    private List&lt;Item&gt; RetrieveItems(Folder folder, string query)
      {
          const int PAGE_SIZE = 500;
  
          List&lt;Item&gt; items = new List&lt;Item&gt;();
          int offset = 0;
          bool moreResults = false;
  
          do
          {
              ItemView view = new ItemView(PAGE_SIZE, offset);
              view.PropertySet = new PropertySet(EmailMessageSchema.Subject, EmailMessageSchema.LastModifiedTime, EmailMessageSchema.DateTimeCreated, EmailMessageSchema.Size, EmailMessageSchema.ItemClass, ItemSchema.HasAttachments);
  
              FindItemsResults&lt;Item&gt; results = null;
              Retry(() =&gt;
              {
                  results = folder.FindItems(query, view);
              });
  
              // Modify this to support &quot;Collect Non-Email Data&quot; (for non-public folder requests.)
              // Right now, we are collecting email AND non-email data unconditionally.
              items.AddRange(results);
  
              offset += PAGE_SIZE;
              moreResults = results.MoreAvailable;
          }
          while (moreResults);
  
          return items;
      }
  </code></pre>