Oscar N Prawata

Hi,

I've written a BDC application definition file to enable searching contents from a web service application. It's already working. Now, I'm trying to enable incremental crawl for my application. I've added a return field in the ID enumerator method of my web service which contains the last update date of the related item and also added the same in the definition file. I've also added __BdcLastModifiedTimeStamp property to the entity with the value to be the TypeDescriptor name of the last update date field in the IDEnumerator.

Now.... everytime I trigger an incremental crawl, Sharepoint still calling SpecificFinder method for all the IDs returned in the IDEnumerator instead of only for the updated items.

Any idea where I might have done wrong

The following is the definition script:

< xml version="1.0" encoding="utf-8" >
<LobSystem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsiTongue TiedchemaLocation="http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog BDCMetadata.xsd"
Type="WebService"
Version="1.0.0.0"
Name="EQ Studio (Stock Books)"
xmlns="http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog">
<Properties>
<Property Name="WebServiceProxyNamespace" Type="System.String">EQStudioWebServiceProxy</Property>
<Property Name="WsdlFetchUrl" Type="System.String">http://s-km01d:9009/EQStudio.asmx</Property>
</Properties>
<LobSystemInstances>
<LobSystemInstance Name="EQ Studio (Stock Books) Instance">
<Properties>
<Property Name="LobSystemName" Type="System.String">EQ Studio (Stock Books)</Property>
</Properties>
</LobSystemInstance>
</LobSystemInstances>
<Entities>
<Entity Name="StockBook">
<Properties>
<Property Name="Title" Type="System.String">Stock Book</Property>
<Property Name="__BdcLastModifiedTimeStamp" Type="System.String">LastModifiedOn</Property>
</Properties>
<Identifiers>
<Identifier Name="SecId" TypeName="System.Int32" />
</Identifiers>
<Methods>
<Method Name="GetStockBookIds">
<Parameters>
<Parameter Direction="Return" Name="StockBookIDs">
<TypeDescriptor TypeName="EQStudioWebServiceProxy.StockBook[], EQ Studio (Stock Books)" IsCollection="true" Name="StockBooks">
<TypeDescriptors>
<TypeDescriptor TypeName="EQStudioWebServiceProxy.StockBook, EQ Studio (Stock Books)" Name="StockBook">
<TypeDescriptors>
<TypeDescriptor TypeName="System.Int32" IdentifierName="SecId" Name="StockBookId" />
<TypeDescriptor TypeName="System.DateTime" Name="LastModifiedOn" />
</TypeDescriptors>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Name="GetStockBookIdsInstance" Type="IdEnumerator" ReturnParameterName="StockBookIDs" />
</MethodInstances>
</Method>
<Method Name="GetStockBookDetails">
<Parameters>
<Parameter Direction="In" Name="stockBookId">
<TypeDescriptor TypeName="System.Int32" IdentifierName="SecId" Name="stockBookId" />
</Parameter>
<Parameter Direction="Return" Name="StockBookDetails">
<TypeDescriptor TypeName="EQStudioWebServiceProxy.StockBook, EQ Studio (Stock Books)" Name="StockBook">
<TypeDescriptors>
<TypeDescriptor TypeName="System.Int32" IdentifierName="SecId" Name="StockBookId" />
<TypeDescriptor TypeName="System.String" Name="Description" />
<TypeDescriptor TypeName="System.String" Name="Title" />
<TypeDescriptor TypeName="System.String" Name="Category" />
<TypeDescriptor TypeName="System.String" Name="URL" />
<TypeDescriptor TypeName="System.String" Name="IMAPURL" />
<TypeDescriptor TypeName="System.String" Name="LastModifiedBy" />
<TypeDescriptor TypeName="System.DateTime" Name="LastModifiedOn" />
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Name="GetStockBookDetailsInstance" Type="SpecificFinder" ReturnParameterName="StockBookDetails" />
</MethodInstances>
</Method>
<Method Name="GetStockBookAccess">
<FilterDescriptors>
<FilterDescriptor Name="UserContextFilter" Type="UserContext" />
</FilterDescriptors>
<Parameters>
<Parameter Direction="In" Name="StockBookId">
<TypeDescriptor TypeName="System.Int32[]" IsCollection="true" Name="stockBookIds">
<TypeDescriptors>
<TypeDescriptor TypeName="System.Int32" IdentifierName="SecId" Name="StockBookId" />
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
<Parameter Direction="In" Name="UserId">
<TypeDescriptor TypeName="System.String" AssociatedFilter="UserContextFilter" Name="userId" />
</Parameter>
<Parameter Direction="Return" Name="UserAccessList">
<TypeDescriptor Name="List" TypeName="System.Int64[]" IsCollection="true">
<TypeDescriptors>
<TypeDescriptor Name="Item" TypeName="System.Int64" />
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Name="GetStockBookAccessInstance" Type="AccessChecker" ReturnParameterName="UserAccessList" ReturnTypeDescriptorName="Item" />
</MethodInstances>
</Method>
</Methods>
</Entity>
</Entities>
</LobSystem>


Re: SharePoint - Business Data Catalog BDC Incremental Crawl

Bercos

Hi Oscar,

The correct name for property "__BdcLastModifiedTimeStamp" is "__BdcLastModifiedTimestamp", minus "s" in Timestamp.

Example:

<Property Name="__BdcLastModifiedTimestamp" Type="System.String">modifiedtime</Property>





Re: SharePoint - Business Data Catalog BDC Incremental Crawl

Oscar N Prawata

Hi Bercos,

Thank you very much. I'll try on that.

It seems also Microsoft has updated the documentation (http://msdn2.microsoft.com/en-us/library/ms577629.aspx) to use lower case 's' instead of upper case 's' as what I have in my definition (which I took from the installable version of the SDK)

Once again, thank you very much.

Regards,

Oscar





Re: SharePoint - Business Data Catalog BDC Incremental Crawl

Oscar N Prawata

I was referring to SDK v1 when I first started writing my application definition file. There, it's still using upper-case 's' instead of lower case 's'. I didn't pay attention that after that they've updated the SDK in the web site and in the new SDK version.

Thank you for pointing this out.

Regards,

Oscar





Re: SharePoint - Business Data Catalog BDC Incremental Crawl

Glenn Qiu

damn it, a breaking change like that is not pointed out anywhere at all




Re: SharePoint - Business Data Catalog BDC Incremental Crawl

Varsha

It doesnt work we use __BdcLastModifiedTimestamp, with a small s

The crawl starts throwing errors. So certainly we need to use __BdcLastModifiedTimeStamp.

But the initial problem still persists in my case- its fetching all IDs during incremental crawl.





Re: SharePoint - Business Data Catalog BDC Incremental Crawl

Oscar N Prawata

It will obviously not throwing error if you use __BdcLastModifiedTimeStamp since BDC will ignore that field. If try to see the code using Reflector, it's only checking whether a property with the name __BdcLastModifiedTimestamp exists in the entity. It's not checking if there is unknown property or not.

Maybe you can post your definition file here And some description on the error message will be helpful also.