Welcome back to Part 5 of our 8 Business Data Catalog (BDC) series. In this article, we will be focusing on BDC Search. Specifically we’ll be focusing on how to enable BDC Search, how to enable full and incremental crawls of BDC data sources, and how to create a search content source and search scopes. We’ll then walk you through how to make our customer data searchable and how to make the search results “actionable”.
If you’ve been following our BDC series, we’ve previously gone through the following topics:
With the help of the BDC Search, these all become possible. The Enterprise Search in MOSS can gather, index, and offer full-text search on all business data (entity instances) from applications registered in the BDC. Not only does it enable us to find answers in MOSS, but also it allows us to do so without having to leave SharePoint to go to these systems individually. It makes integrating search into existing line of business (LOB) applications like a CRM solution easier.
For example, if we register the Northwind sample database in the BDC, Enterprise Search can crawl it and return customer data in search results. In addition, the Enterprise Search feature’s extensibility enables us to create customized search experiences. We can create a custom search tab in the Search Center where our users can search for customers in the database, and we can also create a custom UI for the search results based on which we can also take action. So let’s dive right into it.
As we’ve covered in prior articles, surfacing the BDC data to SharePoint using BDC Web Parts and lists is just first part of the BDC saga, it can also enable you to index and search on the BDC data. The following figure is an example of searching for information about a customer and then displaying both structured data from the database and unstructured documents and content stored within SharePoint.
![]()
Figure 1: Enterprise Search with BDC
Here’s another example of leveraging BDC to index Project Server data and enable us to search the different objects (projects, tasks, resources, custom fields, lookup tables, and so on). This is of great value because out of the box the Project Server data is not indexed. Only the objects in project workspace are indexed such as Issues, Risks, Documents, etc. For instance, if we are looking for project detail information for the Enterprise resource planning (ERP) project, we can search our Project Server and find the answers as shown in Figure 2:
![]()
Figure 2: Search Project Server with BDC
The BDC is truly a catalog of business applications that helps bridge the gap between MOSS and business applications by bringing in key data from various applications to SharePoint sites, lists, searches, and user profiles. Let’s revisit the BDC architecture from Part 1 with both XML Metadata and Search components highlighted in Figure 3.
![]()
Figure 3: BDC architecture with emphasis on the Search
Firstly, we’ve highlighted the XML Metadata because it is the key element in the Application Definition that makes the BDC Search possible. BDC operates off of an XML-based Application Definition File (ADF). The metadata in ADF enables MOSS to crawl the BDC data source and add them to the search index.
Secondly, we highlight the Search component because the search engine uses a protocol handler to crawl and a security trimmer to filter results. BDC uses these just like third party implementations when supporting BDC searching.
BDC Search enables us to quickly find content in business data through search queries. It also integrates with search scopes and search center to become an integral part of MOSS Enterprise Search. Here I’ve created a custom search tab and a search scope for the BDC data to create a unique search experience in which the BDC search results are segregated from the rest of SharePoint search results. See Figure 4.
![]()
Figure 4: Customized BDC Search Experience in Search Center
By enabling the search of BDC data, BDC Search extends the SharePoint search capabilities. This extends the reach of the back-end LOB systems. Today most LOB systems don’t have Full-Text search capability and BDC Search can serve for that purpose.
However, out of the box the BDC Search does not support indexing unstructured data like documents in a document management system. This is because the protocol handler for BDC is meant to connect to external structured data only. With custom protocol handlers, it’s possible to make MOSS index unstructured data . For example, using Web services to directly support BDC we can enable SharePoint to search, list, and retrieve documents from an external document management system via Web services.
Now let’s look into how to enable BDC Search.
One might think once we import an ADF, we can start to search. BDC Search doesn’t come automatically, and we must enable it. To enable BDC Search, we must first make sure these two methods exist in the ADF for the entity you want to crawl:
These are the only required metadata for Enterprise Search to use BDC to index the business application’s data.
In Part 2, we’ve covered the ADF and its vocabulary: System (data source), Entity (table), Method (operation on entity), and Association (relationship). There are three primary types of methods: Finder, SpecificFinder and IdEnumerator. An IdEnumerator method returns a searchable list of unique IDs for an entity. This list enables indexing of the entities and SpecificFinder is then used to find details for the entity instance based on the specific ID. Therefore, IdEnumerator and SpecificFinder work together to enable Enterprise Search to use BDC to crawl the business data.
Now since we have a good understanding of what it takes, let’s put it in action. We’re going to use Business Data Catalog Definition Editor, a free tool from the MOSS SDK, to create our ADF (shown in Figure 5 below). Though one of the limitations of this tool is that it doesn’t create a Finder method, BDC Search doesn’t need use this anyway, so it works very well for creating an ADF that’s just used for searching. You can learn how to use this tool here.
Incidentally, both MOSS BDC Design Studio and BDCMetaMan will create these methods necessary to implement BDC searching.
We begin by adding a LOB system for our sample database, a modified version of Northwind database. We’re going to use the Customers entity that resembles one in a CRM system (or the like).
![]()
Figure 5: Create Application Definition
To index and search for Customers entity in the database, we’re performing the following tasks:
![]()
Figure 6: Define a special type of MethodInstance method IdEnumerator.
The IdEnumerator method returns a list of CustomerID records, which will be indexed by MOSS Search. So now we know that the sole purpose of IdEnumerator here is to enable Search. Here’s the SQL query:
The SpecificFinder method then uses the CustomerID returned from above IdEnumerator method as a parameter (where CustomerID=@CustomerID) to retrieve the fields for this particular customer. This is how the BDC search is able to search the entire Customers entity. So to make a field searchable, we just include it in the query and return as type string. Here’s the SQL Query:
Select CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax
from Customers
where customerID=@CustomerID
Now we have our required metadata well-defined in the ADF, we are ready to export the XML metadata to an ADF file and then import it to MOSS. Once we have it imported, we can confirm that our Customers entity implements the two methods in SSP Administration page by viewing application and then entity. The Crawlable property under Entity Information means our Customers entity is available to be crawled, as shown in Figure 8.
![]()
Figure 8: View Entity Information in SSP
So far we have started from creating the ADF to importing it to enable searching. Since we can enable searching on any entity that has an IdEnumerator and SpecificFinder defined, we don’t have to start from scratch to set this up specifically for search. We can just go straight to configuring the Enterprise Search.
Configuring the Enterprise Search consists of the following steps:
We start by creating a content source for our BDC application and performing a full crawl, then optionally create a search scope and scope rule. These steps are very straight forward so I will focus on the main points. If you’re interested in each and every detail, check out the Customizing Search Series by Steve Mann.
Step 1: Create a content source (Figure 9)
In order to create a content source, go to SSP Administration page –> Search Settings under Search section, and click on “Content Sources and Crawl Schedules”. Click on “New Content Source” and give a name for this content source; specify “Business Data” as the type of the content to be crawled. Additionally, if we wish to index the content at regular intervals we could create a Crawl schedule that defines our full crawl schedules. Here is how my screen looks:
![]()
Figure 9: Create a content source
Step 2: Perform a full crawl (Figure 10)
In the above step, since I’ve checked the Start full crawl of this content source, it will initiate a full crawl of the new content source, and we should now see the content source crawling as shown below:
![]()
Figure 10: Perform a full crawl
We can also check the crawl log to make sure that the BDC data has been indexed correctly. At this point, we should be able to search our customers table. If we search for “great lakes”, we get search results as shown in Figure 1 above.
As we can see, both documents and BDC Search Results are listed together. This demonstrates some of the real power behind Enterprise Search. That is, we’re seeing SharePoint content side by side with external BDC content. This is great especially when we intend to search everything including both documents and BDC sources.
Another real power of Enterprise Search is its extensibility. We can create customized search experiences by creating a custom search tab in the Search Center where our users can search for customers in the database, and we can create a custom UI for the search results. This is what we’re going to do to separate the BDC Search results from other content. We can achieve this by performing the following two additional steps: 1) creating a search scope for BDC and 2) adding a scope rule.
Step 3: Create a search scope (Figure 11)
In order to create a search scope, go to the SSP Administration page, under Search section, click on Search settings. In the “Scopes” area, click on “View Scopes”. Click on “New Scope”, give it a name.
![]()
Figure 11: Create a search scope
Step 4: Add scope rule
Click on “Add Rules” where it says “Empty – Add Rules” on the newly added scope (Figure 12).
Specify a Content Source as shown below (Figure 13):
![]()
Figure 13: Add scope rule – specifying a content source
Our BDC Search scope has been created and is now available in the search drop-down as shown in Figure 14. If we now search for “great lakes”, we get search results back from the existing database as shown in Figure 4 above.
![]()
Figure 14: BDC Search scope is available for use
As you have seen, the last two steps, even though optional, do give us additional value. That is, to segregate the BDC search results from the rest of SharePoint search results so that we can focus on just business data. Thus better search relevance is accomplished through the extensibility!
It is a good time for us to know how to configure BDC Search access permission so that it will work out-of-the-gate. Often times we forget about it or ignore it, and only when the crawling fails or when the search returns no results, do we go in and dig the logs, even though it is not a bad troubleshooting methodology.
In these examples, we’ve been using “PassThrough” authentication in the ADF. That means additional settings have to be configured so that the “Default Content Access Account” (the account used to crawl) has access to the database. Also the “Default Content Access Account” must have appropriate rights to the BDC application and entity.
We’ll achieve that in the following steps:
![]()
Figure 15: Specify the Default Content Access Account
![]()
Figure 16: Grant Execute, Selectable permissions
Note: there might be a delay of a few minutes after the permission is changed on BDC application. You may delete and re-import the BDC application definition at when needed — no need to re-crawl as long as the BDC name is not changed.
Next, we’re going to show you how create an enhancement to our ADF to support incremental crawling through the use of the __BdcLastModifiedTimestamp entity property.
To optimize search performance, it’s important to have incremental crawl. As you may know, Incremental Crawl is a process of crawling only new or changed content from the previous full or incremental crawl. This means that we have to let BDC know what has changed since its last crawl.
To ensure that incremental crawls can be performed in the database when indexing, we’ll need to enhance the IdEnumerator method that has a return field that represents the last update time for that particular row. The Type attribute of the __BdcLastModifiedTimestamp property must be System.String and its value must be set to the value of the Name attribute of the TypeDescriptor for the field returned by the IDEnumerator method that contains the last modified date and time of the entity instance. This is illustrated below.
In our Customers table, we start by adding a column called LastUpdated of data type DateTime to indicate the last modified time of a single row. SharePoint indexing service will use that as a time stamp and incremental crawling is enabled. SQL-knowledgeable people should not confuse this with a timestamp data type. The example we are walking through is specific to SQL Server, but the concept will apply to other databases or Web Service methods.
Here are the specific steps to enable incremental crawling:
The following figures are the screens for performing the above tasks:
![]()
Figure 16: Create a LastUpdated column of datetime type in SQL Server

Figure 17: Add the __BdcLastModifiedTimestamp property

Figure 18: Have IdEnumerator method return LastUpdated field

Figure 19: Add a TypeDescriptor with its TypeName attribute set to System.DateTime
To compare the performance, I then performed an incremental crawl. This is shown in Figure 20 below.
![]()
Figure 20: Comparison between the incremental crawling and the full crawling.
In our sample, it took significantly less time in the incremental crawling than the full crawl (35 seconds vs. 54 seconds). Depending on the size of the database and the number of changes that need to be processed with each crawl, the difference in crawl times will vary. The key of enabling incremental crawl here is performance so that the back-end systems are not unnecessarily burdened by the crawling.
Lastly, let’s show you how we can make our BDC search results “actionable” by creating a custom action on the Customers entity. There are two ways to create a custom action. It can be defined either in the ADF or added after the ADF is imported by going to SSP administration page (View Application –> View Entity).
By default through the SpecificFinder method, we get a default view Profile action that links to a simple page with your search results. This is where the customization comes in, and you could create custom Web Parts to provide more user-friendly and richer user experience. We’ll dedicate Part 8 of this series to Custom Actions so you have the best for last. For this article, let’s quickly create a custom action to map the customer using Live Search Maps (maps.Live.com).
Here are the specific steps to enable custom action with Live Search Maps:
Go to SSP administration page (View Application –> View Entity), add action and configure URL parameters.
![]()
Figure 21: Create a custom action in SSP
The parameter “Address” will be substituted at index “0″, which is specified as a querystring URL to maps.live.com. If you have already deployed your ADF before creating a custom action, you will need to redeploy it if you use this approach to adding a custom action.
Check the custom action to ensure it’s configured and ready for use (Figure 22).
![]()
Figure 22: Live Map Action appears under Actions
Now let’s test-drive our search and custom action in the following two steps:
![]()
Figure 23: Search result of a customer entity
Clicking on “The Big Cheese“ will take us to the default profile page, where we can see and act upon the custom action Live Map (maps.live.com) as shown below. Clicking on Live Map will issue a search on maps.live.com using the address of “The Big Cheese”. Here’s the live map (Figure 26). Neat!
![]()
Figure 24: BDC Search Results with Live Map action available
![]()
Figure 25: Live Map of the searched customer
In this article we have covered the concepts behind BDC search and how to enable it. We’ve then walked you through how to make our Customer data searchable, and how to make a custom action on search results. In doing so, we’ve demonstrated the power behind BDC and MOSS Enterprise Search. Even though we have only used a database in our example, this is also all possible with Web Services, provided the SpecificFinder and IdEnumerator methods are still in place. Hope you have enjoyed reading it as much as I have enjoyed writing it. Look forward to your comments and suggestions. Aloha!
I am a senior consultant for eWorld Enterprise Solutions, specializing in architecting and developing solutions on SharePoint. I have implemented numerous Enterprise Content Management (ECM), Enterprise Project Management (EPM) and business intelligence solutions leveraging the SharePoint enterprise platform. I founded the Hawaii SharePoint User Group (sharepointhawaii.com). I am MCSE, MCSD, MCDBA, and MCTS (WSS & MOSS Development) certified and have presented at both the SharePoint User Group and Hawaii .NET User Group. I blog my SharePoint best practices at http://sharepointhawaii.com/wenhe.
Contact the author | Other Posts by Wen He (2) | Author's Website