2013-06-06 33 views
5

Piszę niestandardowe złącze indeksowania przy użyciu metody indeksowania przyrostowego.Niestandardowe złącze indeksujące BCS z indeksowaniem przyrostowym inkrementalnym nie działa poprawnie

Używam próbki z http://msdn.microsoft.com/en-us/library/ff625800%28v=office.14%29.aspx i próbuję ją dla mnie zmienić.

Mój model ma kolejne stereotypy: IdEnumerator, ChangedIdEnumerator, DeletedIdEnumerator, SpecificFinder, Finder StreamAccessor

Jeśli Zaczynam pełne przeszukiwanie, IdEnumerator, ChangedIdEnumerator, DeletedIdEnumerator zostanie wywołana.

Pierwszy problem: nie jest wywoływany FindFinder.

Jeśli Zaczynam przyrostowe indeksowanie, ChangedIdEnumerator i DeletedIdEnumerator zostanie wywołana.

DeletedIdEnumerator działa: elementy z usuniętymi identyfikatorami są usuwane z indeksu.

Drugi problem: ChangedIdEnumerator nie działa. Nic się nie dzieje po tym, jak zwróciłem zmienione identyfikatory.

W rejestrze crowl są teraz błędy.

Mój model jest tutaj:

<Model xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Name="MyFileModel" xmlns="http://schemas.microsoft.com/windows/2007/BusinessDataCatalog"> 
    <LobSystems> 
    <LobSystem Name="MyFileSystem" Type="Custom"> 
     <Properties> 
     <Property Name="SystemUtilityTypeName" Type="System.String">MyFileConnector.MyFileConnector, MyFileConnector, Version=1.0.0.0, Culture=neutral, PublicKeyToken=15865f58b9878bf8</Property> 
     <Property Name="SystemUtilityInstallDate" Type="System.DateTime">2013-01-01 00:00:00Z</Property> 
     <Property Name="InputUriProcessor" Type="System.String">MyFileConnector.MyFileLobUri, MyFileConnector, Version=1.0.0.0, Culture=neutral, PublicKeyToken=15865f58b9878bf8</Property> 
     <Property Name="OutputUriProcessor" Type="System.String">MyFileConnector.MyFileNamingContainer, MyFileConnector, Version=1.0.0.0, Culture=neutral, PublicKeyToken=15865f58b9878bf8</Property> 
     </Properties> 
     <LobSystemInstances> 
     <LobSystemInstance Name="MyFileConnector_instance"> 
      <Properties> 
      <Property Name="AuthenticationType" Type="System.String">Credentials</Property> 
     </Properties> 
     </LobSystemInstance> 
     </LobSystemInstances> 
    <Entities> 
    <Entity Name="MyFolder" Namespace="MyFileConnector" Version="1.0.0.1"> 
     <Properties> 
     <Property Name="Title" Type="System.String">Name</Property> 
     </Properties> 
     <Identifiers> 
     <Identifier Name="ID" TypeName="System.String" /> 
     </Identifiers> 

     <Methods> 
     <!--  IdEnumerator   --> 
     <Method Name="ReadAllIds" DefaultDisplayName="ReadAllIds" IsStatic="false"> 
      <Parameters> 
      <Parameter Name="returnIds" Direction="Return"> 
       <TypeDescriptor Name="Nodes" TypeName="Microsoft.BusinessData.Runtime.DynamicType[]" IsCollection="true"> 
       <TypeDescriptors> 
        <TypeDescriptor TypeName="Microsoft.BusinessData.Runtime.DynamicType" Name="Node"> 
        <TypeDescriptors> 
         <TypeDescriptor Name="ID" TypeName="System.String" IdentifierName="ID" /> 
        </TypeDescriptors> 
        </TypeDescriptor> 
       </TypeDescriptors> 
       </TypeDescriptor> 
      </Parameter> 
      </Parameters> 
      <MethodInstances> 
      <MethodInstance Type="IdEnumerator" Name="ReadAllIds" DefaultDisplayName="ReadAllIds" ReturnParameterName="returnIds" Default="true"> 
       <Properties> 
       <Property Name="RootFinder" Type="System.String">true</Property> 
       </Properties> 
       <AccessControlList> 
       <AccessControlEntry Principal="NT AUTHORITY\Authenticated Users"> 
        <Right BdcRight="Execute" /> 
       </AccessControlEntry> 
       <AccessControlEntry Principal="NT AUTHORITY\System"> 
        <Right BdcRight="SetPermissions"/> 
       </AccessControlEntry> 
       </AccessControlList> 
      </MethodInstance> 
      </MethodInstances> 
     </Method> 
     <!--  ChangedIdEnumerator   --> 
     <Method Name="ReadIncrementalList" IsStatic="false"> 
      <FilterDescriptors> 
      <FilterDescriptor Name="LastCrawl" Type="InputOutput"> 
       <Properties> 
       <Property Name="SynchronizationCookie" Type="System.String">x</Property> 
       </Properties> 
      </FilterDescriptor> 
      <FilterDescriptor Name="Timestamp" Type="Timestamp" /> 
      </FilterDescriptors> 
      <Parameters> 
      <Parameter Name="lastCrawlDate" Direction="InOut"> 
       <TypeDescriptor Name="LastCrawlDate" TypeName="System.DateTime" IsCollection="false" AssociatedFilter="LastCrawl"> 
       <Interpretation> 
        <NormalizeDateTime LobDateTimeMode="Local" /> 
       </Interpretation> 
       </TypeDescriptor> 
      </Parameter> 
      <Parameter Name="returnIds" Direction="Return"> 
       <TypeDescriptor TypeName="Microsoft.BusinessData.Runtime.DynamicType[]" Name="Nodes" IsCollection="true" > 
       <TypeDescriptors> 
        <TypeDescriptor TypeName="Microsoft.BusinessData.Runtime.DynamicType" Name="Node"> 
        <TypeDescriptors> 
         <TypeDescriptor TypeName="System.String" IdentifierName="ID" Name="ID" /> 
        </TypeDescriptors> 
        </TypeDescriptor> 
       </TypeDescriptors> 
       </TypeDescriptor> 
      </Parameter> 
      </Parameters> 
      <MethodInstances> 
      <MethodInstance Name="ReadIncrementalListInstance" Type="ChangedIdEnumerator" ReturnParameterName="returnIds" Default="true"> 
       <AccessControlList> 
       <AccessControlEntry Principal="NT AUTHORITY\Authenticated Users"> 
        <Right BdcRight="Execute" /> 
        <Right BdcRight="SetPermissions" /> 
       </AccessControlEntry> 
       </AccessControlList> 
      </MethodInstance> 
      </MethodInstances> 
     </Method> 
     <!--  DeletedIdEnumerator   --> 
     <Method Name="ReadDeletedIncrementalList" IsStatic="false" DefaultDisplayName="ReadDeletedIncrementalList"> 
      <FilterDescriptors> 
      <FilterDescriptor Name="LastCrawl" Type="InputOutput"> 
       <Properties> 
       <Property Name="SynchronizationCookie" Type="System.String">x</Property> 
       </Properties> 
      </FilterDescriptor> 
      <FilterDescriptor Name="Timestamp" Type="Timestamp" /> 
      </FilterDescriptors> 
      <Parameters> 
      <Parameter Name="LastCrawlDate" Direction="InOut"> 
       <TypeDescriptor Name="LastCrawlDate" TypeName="System.DateTime" IsCollection="false" AssociatedFilter="LastCrawl"> 
       <Interpretation> 
        <NormalizeDateTime LobDateTimeMode="Local" /> 
       </Interpretation> 
       </TypeDescriptor> 
      </Parameter> 
      <Parameter Name="deletedIds" Direction="Return"> 
       <TypeDescriptor TypeName="Microsoft.BusinessData.Runtime.DynamicType[]" Name="Nodes" IsCollection="true"> 
       <TypeDescriptors> 
        <TypeDescriptor TypeName="Microsoft.BusinessData.Runtime.DynamicType" Name="Node"> 
        <TypeDescriptors> 
         <TypeDescriptor Name="ID" TypeName="System.String" IdentifierName="ID" /> 
        </TypeDescriptors> 
        </TypeDescriptor> 
       </TypeDescriptors> 
       </TypeDescriptor> 
      </Parameter> 
      </Parameters> 
      <MethodInstances> 
      <MethodInstance Name="ReadDeletedIncrementalListInstance" Type="DeletedIdEnumerator" ReturnParameterName="deletedIds"> 
       <AccessControlList> 
       <AccessControlEntry Principal="NT AUTHORITY\Authenticated Users"> 
        <Right BdcRight="Execute" /> 
        <Right BdcRight="SetPermissions" /> 
       </AccessControlEntry> 
       </AccessControlList> 
      </MethodInstance> 
      </MethodInstances> 
     </Method> 

     <!--  Finder   --> 
     <Method Name="ReadAllItems" DefaultDisplayName="ReadAllItems" IsStatic="false"> 
      <Parameters> 
      <Parameter Name="returnAllItems" Direction="Return"> 
       <TypeDescriptor TypeName="Microsoft.BusinessData.Runtime.DynamicType[]" Name="Nodes" IsCollection="true" > 
       <TypeDescriptors> 
        <TypeDescriptor TypeName="Microsoft.BusinessData.Runtime.DynamicType" Name="Node"> 
        <TypeDescriptors> 
         <TypeDescriptor TypeName="System.String" IdentifierName="ID" Name="ID" /> 
         <TypeDescriptor TypeName="System.String" Name="Name" /> 
         <TypeDescriptor TypeName="System.String" Name="Title" /> 
         <TypeDescriptor TypeName="System.String" Name="Path" /> 
        </TypeDescriptors> 
        </TypeDescriptor> 
       </TypeDescriptors> 
       </TypeDescriptor> 
      </Parameter> 
      </Parameters> 
      <MethodInstances> 
      <MethodInstance Type="Finder" Name="ReadAllItems" DefaultDisplayName="ReadAllItems" ReturnParameterName="returnAllItems" Default="true" ReturnTypeDescriptorName="Nodes" ReturnTypeDescriptorLevel="0"> 
       <AccessControlList> 
       <AccessControlEntry Principal="NT AUTHORITY\Authenticated Users"> 
        <Right BdcRight="Execute" /> 
       </AccessControlEntry> 
       <AccessControlEntry Principal="NT AUTHORITY\System"> 
        <Right BdcRight="SetPermissions"/> 
       </AccessControlEntry> 
       </AccessControlList> 
      </MethodInstance> 
      </MethodInstances> 
     </Method> 

     <!--  SpecificFinder   --> 
     <Method Name="ReadItem" DefaultDisplayName="ReadItem" IsStatic="false"> 
      <Parameters> 
      <Parameter Direction="In" Name="ID"> 
       <TypeDescriptor TypeName="System.String" IdentifierName="ID" Name="ID" /> 
      </Parameter> 
      <Parameter Direction="Return" Name="returnParameter"> 
       <TypeDescriptor TypeName="Microsoft.BusinessData.Runtime.DynamicType" Name="Node"> 
       <TypeDescriptors> 
        <TypeDescriptor TypeName="System.String" IdentifierName="ID" Name="ID" ReadOnly="true" /> 
        <TypeDescriptor TypeName="System.String" Name="Title" /> 
        <TypeDescriptor TypeName="System.String" Name="Author" /> 
       </TypeDescriptors> 
       </TypeDescriptor> 
      </Parameter> 
      </Parameters> 
      <MethodInstances> 
      <MethodInstance Type="SpecificFinder" ReturnParameterName="returnParameter" ReturnTypeDescriptorName="Node" Default="true" Name="ReadItem" DefaultDisplayName="ReadItem" ReturnTypeDescriptorLevel="0"> 
       <AccessControlList> 
       <AccessControlEntry Principal="NT AUTHORITY\Authenticated Users"> 
        <Right BdcRight="Execute" /> 
       </AccessControlEntry> 
       <AccessControlEntry Principal="NT AUTHORITY\System"> 
        <Right BdcRight="SetPermissions"/> 
       </AccessControlEntry> 
       </AccessControlList> 
      </MethodInstance> 
      </MethodInstances> 
     </Method> 
     </Methods> 
    </Entity> 
    </Entities> 
</LobSystem> 

Co robię źle? Byłbym wdzięczny za wszelkie uwagi.

Odpowiedz

0

mieć taką samą nazwę SynchronizationCookie („X”), podać inną nazwę pliku cookie do każdej z metod

0

I napotkał podobny problem niedawno (SpecificFinder nie nazywa) w moim łącznikiem zwyczaj BCS i udało się rozwiązać to. W moim scenariuszu mam dwie jednostki (rodzic i dziecko), a SpecificFinder został wywołany tylko dla jednostek nadrzędnych, ale nie został wywołany dla dzieci. Okazało się, że problem był związany ze sposobem, w jaki zbudowałem "dostęp URI". Początkowo URI było tak:

<protocol>://<entity_name>/<entity_id> 

A mój początek adresu URL (określone w definicji źródła treści) był adres URL "fake" jednostki dominującej (bez ID):

<protocol>://<parent_entity_name> 

Ale wydaje się, że robot indeksujący SharePoint traktuje dostęp do identyfikatorów URI w taki sam sposób, jak adresy URL stron internetowych i stosuje filtr według ścieżki adresu URL określonej w definicji źródła treści.Innymi słowy, w moim przypadku, to indeksować tylko URI odpowiadające następującym wzorem:

<protocol>://<parent_entity_name>/* 

Po zmieniłem dostępu formacie URI do

<protocol>://root/<entity_name> 

i ustawić mój początkowy adres URL w źródle treści definicja:

<protocol>://root 

wszystko zaczęło działać poprawnie.