Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a BCS connector (partial BDC Model posted below) and I'm noticing some issues with Sharepoint crawls. My full crawl seems to work perfectly, but incremental is pulling back the same number of records as the full. Which tells me that the code is not being executed properly. What required methods do I need to get incremental working in SharePoint? MSDN and TechNet state I need a ChangedIDEnumerator and perhaps a DeletedEnumerator. I haven't found many examples of this beyond the basics at MSDN or how to test it, or how SparePoint Crawls work internally. How do they call the methods in my model? And when? What triggers each method call? I'm not seeing any errors, but I'm also not seeing fast incremental.

 <Method Name="ChangedList" DefaultDisplayName="ChangedContacts">
      <FilterDescriptors>
        <FilterDescriptor Name="LastRunDate" Type="InputOutput">
          <Properties>
            <Property Name="SynchronizationCookie" Type="System.String">LastModifiedDate</Property>
          </Properties>
        </FilterDescriptor>
        <FilterDescriptor Name="FilterDescriptor" Type="Timestamp" />
      </FilterDescriptors>
      <Parameters>
        <Parameter Name="@LastRunDate" Direction="InOut">
          <TypeDescriptor Name="LastRunDateTypeDescriptor" TypeName="System.DateTime" AssociatedFilter="LastRunDate">
            <Interpretation>
              <NormalizeDateTime LobDateTimeMode="Local" />
            </Interpretation>
          </TypeDescriptor>
        </Parameter>
        <Parameter Direction="Return" Name="returnParameter">
          <TypeDescriptor TypeName="System.Collections.Generic.List`1[[CRMModel.Contact, CRMModel]]" IsCollection="true" Name="ContactList">
            <TypeDescriptors>
              <TypeDescriptor Name="Result" TypeName="CRMModel.Contact, CRMModel" IsCollection="false">
                <TypeDescriptors>
                  <TypeDescriptor Name="Identifier1" TypeName="System.String" IdentifierName="Identifier1" ReadOnly="true" />
                  <TypeDescriptor Name="LastUpdatedDate" TypeName="System.DateTime" IsCollection="false" />
                </TypeDescriptors>
              </TypeDescriptor>
            </TypeDescriptors>
          </TypeDescriptor>
        </Parameter>
      </Parameters>
      <MethodInstances>
        <MethodInstance Type="ChangedIdEnumerator" ReturnParameterName="returnParameter" Name="ChangedList" DefaultDisplayName="ChangedContacts">

        </MethodInstance>
      </MethodInstances>
    </Method>
share|improve this question

1 Answer 1

It seems that you have to add LastModifiedTimeStampField property to your Finder method. Take a look at this blog posts series from Todd Baginski, especially at this one -

The LastModifiedTimeStampField property on the finder method instance is set for two reasons.

  1. So search results will display the last time the data was updated
  2. So the search service knows if the data has been changed when executing incremental crawls.

it should looks like:

<MethodInstances>
<MethodInstance Type="Finder" ReturnParameterName="returnParameter" Default="true" Name="ReadList" DefaultDisplayName="Entity1 List">
  <Properties>
    <Property Name="RootFinder" Type="System.String">x</Property>
    <Property Name="LastModifiedTimeStampField" Type="System.String">LastUpdated</Property></Properties>
  </MethodInstance>
</MethodInstances> 

His sample with flat file bdc model you can download from here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.