Implementing an IdEnumerator
Applies to: SharePoint Server 2010
In this article
An IdEnumerator method instance on the external system enables you to return the field values that represent the identity of Entity instances of a specific Entity. The IdEnumerator input is defined by filter descriptors that are contained in the method that contains the IdEnumerator to get the list of IDs—the unique keys for each entity that should be searchable. This method instance enables external data search in Microsoft SharePoint Server 2010.
Following is a typical method signature for an IdEnumerator method:
EntityDataTypeSimple EnumerateEntity ()
If incremental crawl is required, you must also ensure that one of the return fields in the IdEnumerator for the entity represents the time that the entity instance (or row, in database terminology) was last updated in the external system. You should then set the __BdcLastModifiedTimestamp property of the external content type with the name of the TypeDescriptor in the return value of the IdEnumerator that represents the last modified date.
Entities have zero or one IdEnumerator methods. IdEnumerator methods are not limited to returning a list of IDs. If they return other fields in the return parameter, they are ignored during the crawl.
The LastIdSeen filter enables batching for IdEnumerator methods. For Web services and other non-streaming back-end applications, use the LastIdSeen filter in your IdEnumerator method to improve performance, as shown in the following example:
SELECT TOP 100 Id FROM Customers WHERE Id>=@LastIdSeen ORDER BY Id