RootFinder Property – BCS Search

By

When we were using the Business Data Catalog it was relatively straight forward to setup your Entities so that SharePoint could crawl and return them in search results. Your Entity had to implement a SpecificFinder and IDEnumerator method. With Business Connectivity Services and SharePoint 2010 there are a number of ways to accomplish this goal such as

– Finder, SpecficFinder and RootFinder property

– SpecificFinder and IDEnumerator

How the Business Data Catalog did Indexing

As we have said the SharePoint indexer made use of the SpecificFinder and IDEnumerator method to crawl your BDC data. The IDEnumerator is the first method that is executed and the job of this was simply to return the identifier values that SharePoint was to crawl. If our entity had a field that represented when the row of data was last modified you could also return this in the IDEnumerator and set the property __BdcLastModifiedTimestamp. We have a great article on our web site that explains this in more detail:

Business Data Catalog incremental crawls and how to test.

The RootFinder property

Now we are working with SharePoint 2010 and the Business Connectivity Services the RootFinder property allows you to have an External Content Type that is searchable without having to implement an IDEnumerator method. If you take a look at SharePoint Designer 2010 there is no option to create specifically an IDEnumerator method

image

However if we create an External Content Type using SharePoint Designer 2010 it is possible to setup a content source to crawl it and display it in search results. If you export the BCS model from SharePoint Designer 2010 you’ll be able to find out why. To do this:

1, Click on the External Content Types view in SharePoint Designer 2010 when you have connected to your SharePoint site

2, Right click on the External Content Type and choose Export Application Model from the menu

image

3, Give the model a name, and then select a file location to save it

If you take a look at the XML, find the Read List method and locate the MethodInstance element

<MethodInstances>
    <MethodInstance Type=”Finder” ReturnParameterName=”Read List” Default=”true” Name=”Read List” DefaultDisplayName=”Products Read List”>
        <Properties>
            <Property Name=”UseClientCachingForSearch” Type=”System.String”></Property>
            <Property Name=”RootFinder” Type=”System.String”></Property>
        </Properties>
        <AccessControlList>
        …………

        </AccessControlList>
    </MethodInstance>
</MethodInstances>

Notice that this method is labeled to be used as the RootFinder. This means this Finder method will be used in the same way the IDEnumerator is.

<nick/>