2016-06-07 79 views
1

下面的查詢在搜索文件夾內搜索。該查詢應該與主題或正文匹配。它適用於主題領域(和我測試過的其他領域),但它不適用於身體領域。使用搜索文件夾搜索正文字段

沒有錯誤信息。它根本沒有找到任何有「測試」字樣的電子郵件。

查詢適用於所有領域,當我搜索收件箱,而不是我創建的搜索文件夾。

使用搜索文件夾時,如何搜索體內場?

<?xml version="1.0" encoding="utf-8"?> 
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> 
    <soap:Header> 
     <t:RequestServerVersion Version="Exchange2013_SP1" /> 
    </soap:Header> 
    <soap:Body> 
     <m:FindItem Traversal="Shallow"> 
     <m:ItemShape> 
      <t:BaseShape>AllProperties</t:BaseShape> 
      <t:BodyType>Best</t:BodyType> 
     </m:ItemShape> 
     <m:IndexedPageItemView MaxEntriesReturned="10" Offset="0" BasePoint="Beginning" /> 
     <m:Restriction> 
     <t:Or> 
      <t:Contains ContainmentMode="Substring" ContainmentComparison="IgnoreCase"> 
      <t:FieldURI FieldURI="item:Subject" /> 
      <t:Constant Value="test" /> 
      </t:Contains> 
      <t:Contains ContainmentMode="Substring" ContainmentComparison="IgnoreCase"> 
      <t:FieldURI FieldURI="item:Body" /> 
      <t:Constant Value="test" /> 
      </t:Contains> 
     </t:Or> 
     </m:Restriction> 
     <m:ParentFolderIds> 
      <t:FolderId Id="AQMkADAwATM3ZmYAZS1lOTAwAC0wMAA1ZS0wMAItMDAKAC4AAAPiAHaCXAJHRJ3V9VdvY0KtAQAj99d213jITaEDW4/40fguAAAAHOYgfgAAAA==" /> // root 
     </m:ParentFolderIds> 
     </m:FindItem> 
    </soap:Body> 
    </soap:Envelope> 
+0

聽起來像它不能完成,請參閱下面的vangog的評論[這裏的答案](http://stackoverflow.com/a/36360014/512728) –

回答

1

我在內部跟蹤我們的搜索人員。不幸的是,遺體不屬於可搜索的財產。做一個<Restriction>將無法​​正常工作的身體。

交易所確實使用身體(主體與附件內容)來創建一個,它可以搜索到當您使用查詢字符串「文字包」。因此,例如,如果您在Outlook或OWA中使用搜索框並鍵入「foo」,如果foo位於郵件正文中,它將包含在結果中。

+0

但該查詢確實可以使用區別文件夾,如「收件箱」 。搜索文件夾的工作方式不同 –

+0

在任何一種情況下,這對我來說都不適用於Office 365服務器。 –

+0

idk這很奇怪。 –