Sharepoint 具有修订爬网中的changelog的自定义BCS索引连接器工作不正常

Sharepoint 具有修订爬网中的changelog的自定义BCS索引连接器工作不正常,sharepoint,indexing,web-crawler,connector,bcs,Sharepoint,Indexing,Web Crawler,Connector,Bcs,我正在使用changelog增量爬网方法编写一个自定义索引连接器 我正在使用来自的示例,并尝试为我更改它 我的模型有下一个原型:IdEnumerator、ChangedIdEnumerator、DeletedIdEnumerator、SpecificFinder、Finder、StreamAccessor 如果开始完全爬网,将调用IdEnumerator、ChangedIdEnumerator和DeletedIdEnumerator 第一个问题:没有调用SpecificFinder 如果启动增量

我正在使用changelog增量爬网方法编写一个自定义索引连接器

我正在使用来自的示例,并尝试为我更改它

我的模型有下一个原型:IdEnumerator、ChangedIdEnumerator、DeletedIdEnumerator、SpecificFinder、Finder、StreamAccessor

如果开始完全爬网,将调用IdEnumerator、ChangedIdEnumerator和DeletedIdEnumerator

第一个问题:没有调用SpecificFinder

如果启动增量爬网,则将调用ChangedIdEnumerator和DeletedIdEnumerator

DeletedIdEnumerator正在工作:具有已删除ID的项目将从索引中删除

第二个问题:ChangedIdEnumerator不工作。在我返回更改的ID后,什么也没有发生

crowl日志中现在有错误

我的模型如下:

<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>

MyFileConnector.MyFileConnector,MyFileConnector,版本=1.0.0.0,区域性=中性,PublicKeyToken=15865f58b9878bf8
2013-01-01 00:00:00Z
MyFileConnector.MyFileLobUri,MyFileConnector,版本=1.0.0.0,区域性=中性,PublicKeyToken=15865f58b9878bf8
MyFileConnector.MyFileNamingContainer,MyFileConnector,版本=1.0.0.0,区域性=中性,PublicKeyToken=15865f58b9878bf8
资格证书
名称
真的
x
x


我做错了什么?我非常感谢您的任何意见。

您的SynchronizationCookie(“x”)名称相同,请为您的每个方法指定不同的cookie名称。

我最近在自定义BCS连接器中遇到类似问题(SpecificFinder未调用),并设法将其解决。在我的场景中,我有两个实体(父实体和子实体),SpecificFinder只为父实体调用,而没有为子实体调用。 事实证明,这个问题与我构建“访问URI”的方式有关。最初,URI是这样的:

<protocol>://<entity_name>/<entity_id>
:///
我的起始URL(在内容源定义中指定)是一个“假”父实体的URL(没有任何ID):

://
但SharePoint crawler似乎以与web URL相同的方式处理访问URI,并根据内容源定义中指定的URL路径应用过滤器。换句话说,在我的例子中,它只会抓取与以下模式对应的URI:

<protocol>://<parent_entity_name>/*
:///*
在我将访问URI格式更改为

<protocol>://root/<entity_name>
://根目录/
并将内容源定义中的开始URL设置为

<protocol>://root
://根目录
一切都开始正常运转

<protocol>://root