2016-10-10 8 views
0

特定のカテゴリのすべてのメールを含む論理検索フォルダを作成します。次に、FindItem + ParentFolderIdsクエリを使用してそれらの電子メールを取得します。このFindItemクエリの速度は、アカウント内の電子メールの総数に比例し、論理検索フォルダ内の電子メールの数には比例しないようです。これは正常な動作ですか?ここで論理的なOutlook検索フォルダを作成すると検索の遅れが少なくなりますか?

は、検索フォルダを作成するためのクエリです:

<?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="Exchange2010" /> 
    </soap:Header> 
    <soap:Body> 
     <m:CreateFolder> 
     <m:ParentFolderId> 
      <t:DistinguishedFolderId Id="searchfolders" /> 
     </m:ParentFolderId> 
     <m:Folders> 
      <t:SearchFolder> 
      <t:DisplayName>MySearchFolder</t:DisplayName> 
      <t:PermissionSet> 
       <t:Permissions /> 
      </t:PermissionSet> 
      <t:SearchParameters Traversal="Deep"> 
       <t:Restriction> 
       <t:Contains ContainmentMode="FullString" ContainmentComparison="IgnoreCase"> 
        <t:FieldURI FieldURI="item:Categories" /> 
        <t:Constant Value="My_Category" /> 
       </t:Contains> 
       </t:Restriction> 
       <t:BaseFolderIds> 
       <t:DistinguishedFolderId Id="root" /> 
       </t:BaseFolderIds> 
      </t:SearchParameters> 
      </t:SearchFolder> 
     </m:Folders> 
     </m:CreateFolder> 
    </soap:Body> 
    </soap:Envelope> 

そしてここでは、検索フォルダからメールを取得するためのクエリです:

<?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> 
     </m:ItemShape> 
     <m:IndexedPageItemView MaxEntriesReturned="1000" Offset="0" BasePoint="Beginning" /> 
     <m:Restriction> 
      <t:IsEqualTo> 
       <t:FieldURI FieldURI="item:IsDraft" /> 
       <t:FieldURIOrConstant> 
       <t:Constant Value="false" /> 
      </t:FieldURIOrConstant> 
      </t:IsEqualTo> 
     </m:Restriction> 
     <m:ParentFolderIds> 
      <t:FolderId Id="<The_SEARCH_FOLDER_ID>" /> 
     </m:ParentFolderIds> 
     </m:FindItem> 
    </soap:Body> 
    </soap:Envelope> 

答えて

0

アイテムは実際にはないことに注意してください検索フォルダ内の "in"検索フォルダは、実際にはフォルダのように扱える永続的な検索結果です。したがって、これらのアイテムは、依然としてメールボックス内のさまざまなフォルダに分散されています。

検索フォルダにクエリを実行すると、結果が再評価される可能性が高い2番目の制限(IsDraft = false)が追加されます。

関連する問題