I'm trying to add incremental crawling to an External Content Type that we have defined, but I don't want to use the item time-stamp option, which seems to be so prevalent(see: link). I have a .Net Assembly Connector that's calling a 3rd party web service to retrieve changed/retired items. This is why I'd like to do the incremental crawl with the changelog option.
The problem: I've been able to add the ChangedIdsEnumerator and DeletedIdsEnumerator methods to my model and they get called by the search crawler. However, the DateTime parameter that they are expecting isn't getting set properly. It has the value of "12/31/1899 6:00:00PM", which is the default DateTime value of "1/1/1900 12:00:00 AM" translated to my local time (Central Standard Time).
I've tried changing the type of the parameter to a string, but still get null. The full crawl is completing successfully, and this problem is showing up while attempting an incremental crawl. I'm using SharePoint Server Search... not FAST.
Here's a sample of my BDC model:
<Method Name="ReadChangedItems"> <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 Name="ChangedIds" TypeName="System.Collections.Generic.IEnumerable'1[System.String]" IsCollection="true"> <TypeDescriptors> <TypeDescriptor Name="Id" TypeName="System.String" IdentifierName="id"/> </TypeDescriptors> </TypeDescriptor> </Parameter> </Parameters> <MethodInstances> <MethodInstance Name="ReadChangedItemsInstance" Type="ChangedIdEnumerator" ReturnParameterName="returnIds" /> </MethodInstances> </Method>
Here's a screenshot from my debugging session when the method has been called:
The primary resource which I've been using to try to get this working is this book called "Professional Business Connectivity Services in SharePoint 2010". I've also saved various links that have seemed to be useful into a bit.ly bundle (see: link).