2016-06-07 80 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这很奇怪。 –