Monday, March 31, 2008

Search BDC for Commerce Server

Business Data Catalog, a new feature introduced in Microsoft Office SharePoint Server 2007, provides an easy way to integrate business data from back-end server applications, such as SAP or Siebel, within Office SharePoint Server 2007 without writing any code. This section contains overview information and step-by-step, how-to procedures for programming with the Business Data Catalog.

In this section, I will show you how to create a BDC for the StarterSite_productcatalog database which comes with Commerce Server 2007.

The first thing you will need to do is create the application definition file for the data you want to crawl. There are several resources that you can use to create this file. The SharePoint Server SDK provides the Microsoft Business Data Catalog Definition Editor and an example on how to create the XML for the Adventure Works database. There are several 3rd party tools that will create this file for you.

Click here for a sample file.

Once you create the XML file, you will need to import it. In the Shared Service Provider, click 'Import application definition'. Once there find the file and click 'Import'.





If your import is successful you will find the application definition file under 'View applications' like the illustration below.



If you click the 'View entity' link you will be able to review the entities that were successfully imported along with their data types.



You will then need to create a 'Content Source' that will crawl the Business Data. You can set up the BDC crawl for the entire BDC or a specific application.




Make sure you review the crawl log to make sure all of the data you need gets picked up. The next step in the process is to create a managed property to connect to the crawled properties you intend on searching for.

To get to the 'Managed Properties' window in SharePoint, you will need to access the Shared Service Provider. Once there, you should find a link to 'Metadata property mappings'. Click this to proceed.


The default view is the Managed Properties. You should also notice a Crawled Properties link. The easiest way to link managed properties to crawled properties is to click the 'New Managed Property' link on the Metadata Property Mappings page. I like to make my property name similar to the crawled property I want to link. For the sake of this demo, I am going to add SPCN10, SPCN13, Title, CategoryName, SeriesCode, PackageCode, and ItemNumber. These are the critical fields that I am envisioning will be needed to bring back results from the Commerce Server product catalog.

To add mapping from the Crawled properties section, click 'Add Mapping'. This brings up a screen that helps you wade through the list of content. Make sure to select 'Business Data' and then type in the property name. I have typed 'Title'. It brings back the one result I am looking for. In some circumstances you may want to map one Managed Property to several Crawled Properties. I am doing just that with the SPCN10 and SPCN13 values since they are being used as an ISBN number for books in this particular schema. Make sure you remember to check the 'Allow this property to be used in scopes'.


Now it's time to set up some Search Scopes. I am going to create a search scope for Books. Search scopes can be set up in many different levels. First you have the Site Settings\Scopes, then we have Search Settings Scopes, and finally you can set them up at the site collection level.

Once your scope is created, the next step is to add rules to the item. Here is where we tie our property mappings to our scopes. I am going to select 'Property Query' here and then select
PackageCode. In my database I am using a package code of 'BA', 'BB' and 'BC' to represent books. You will need to create 3 rules to accommodate the search requirements. Don't forget that if you want to run the scope right away to click the 'Start update now' under the scopes section.


From here all that is needed is to set up your Search Center with your new scope.

Happy Searching!!!

Where's My Search Tabs?

Enterprise Search is only available in MOSS and is not a component in WSS. If you have MOSS installed and still can't find the 'Search Center with Tabs' then you will need to activate a feature.


Click on the 'Site Actions' button and then follow it up with 'Site Settings'. In the 'Site Collection Administration' column you will find 'Site Collection Features'. Click it.



Scroll down the list of available features. Find the Office SharePoint Server Standard Site Collection features item and click the 'Activate' button next to it.




Now when you go to create your Search Center, you should have 'Search Center with Tabs'

Search Error - COM 8007042d

I ran into this issue the other day while attempting to set up SharePoint Search using the Central Administration. When I clicked on the ‘Search Settings’ for the Shared Service Provider I received:



“Retrieving the COM class factory for component with CLSID {3D42CCB1-4665-4620-92A3-478F47389230} failed due to the following error: 8007042d. “

The issue was caused by lack of permission on one of the service accounts. To see the real error, run the Event Viewer. Click on ‘Run’ and then type ‘Eventvwr’. This particular error fell under the ‘System’ log. The error was described as:

DCOM got error "The service did not start due to a logon failure. " attempting to start the service OSearch with arguments "" in order to run the server:

{3D42CCB1-4665-4620-92A3-478F47389230}”

The fix was to start Component Services (Under Administration Tools). Under DCOM config, you will find the OSearch component. First find out what the credentials are by using the Identity tab. If the Service is using a system account, you can either elevate the system account or supply a user with significant rights.

Thursday, March 27, 2008

Noise Words in Search

Noise words in Search are words that have no search value in SharePoint. By default, there are eight words (a, And, is, in, it, of, the, to) in the English language that are ignored.

You can find the noise words files for all of the languages at C:\Program Files\Microsoft Office Servers\12.0\Data\Config.

This is an editable list. Many companies choose to include the common 'curse' words to this list to prevent them from showing up when employees type them into search.

Search Indexing Process

The documents you add to the document library or shared folder is not readily available. SharePoint Search crawls your document library, Exchange folders, shared folders, etc. at an increment specified by the scheduler.




Protocol handlers are needed to make the initial connection to a content source. Protocol handlers tell the gatherer how to connect to the target content. SharePoint Portal Server includes protocol handlers for the following document types which are described above. Other protocol handlers can be installed, such as an FTP protocol handler, that will enable the Search service to connect to a File Transfer Protocol (FTP) site as a content source. In addition, you can write your own protocol handlers to connect to a content source by using any transport protocol you want.


SharePoint can read standard ASCII, Word, PowerPoint and Excell files and break up the words in the document. Other kind of documents can not be indexed out of the box. The indexing service views the file just as you would when you open it in notepad. If you have ever tried to open an Adobe .PDF file in notepad, you will get garbled text that is not human readable. IFilters are available to allow various documents to be read by the indexers. You can find various IFilters on the internet. One particular location is at IFilters.org.

The indexer (or crawler) then saves metadata to proprietary property store and full-text indexes for use in search. When you enter a query in SharePoint Search, your query is handled by the Query Processor that communicates with the full-text indexes and property store to retrieve the data you are looking for.

SharePoint Search: WSS 3.0 vs. MOSS 2007

SharePoint Portal Server 2007 and Windows SharePoint Services 3.0 are now built using the same exact search engine. In the previous version of SharePoint, the two searches were built on two different technologies. The primary differences between WSS 3.0 and MOSS 2007 Search are the content sources, scopes, scheduler, and the property management.




Content Sources
Content Sources define where we are going to get information from. WSS only allows you to use the containing site collection as a content source. MOSS 2007 allows you to search SharePoint sites from the same farm or different MOSS 2007, WSS 3.0 or SharePoint Server 2007 for Search farms, websites, exchange folders, file shares, and business data.
You can only crawl one type of content per content source. That is, you can create a content source that contains URLs for SharePoint sites and another that contains URLs for file shares, but you cannot create a single content source that contains URLs to both SharePoint sites and file shares.

Search Scopes
As an administrator you can create search scopes in two levels. The first level is through the Shared Service Provider. Search scopes that are created at this level can be utilities by all of the site collections that use the SSP. The second level is at the site-collection level. Site collection administrators can limit the search scope to be used only within one specific site collection.
In order to create a search scope in the Shared Service Provider you will need to launch the Central Administration site and locate the Shared Service Provider you would like to work with. This will need to be set up if you don’t have one.

For both types, however, the steps are the same. The View Scopes page for a site collection containing a collaboration portal is where you can start maintaining the search scopes and also create new ones.
Creating a new search scope starts by simply specifying a title and description. You also have to associate the search scope with one of the existing display groups. A display group is a layer between the actual search scopes and the drop-down control that displays the search scopes to the user. A search scope, defined either at the global or site-collection level, will not be displayed in the drop-down controls in the SharePoint pages unless they are associated to the corresponding display group.

The final step is to create one or more rules defining the conditions for the search results in the search scope. There are three types of rules possible: For the first, the scope is a URL. The second is an arbitrary property-based rule, and the third is a rule scoped to one of the content sources.



Scheduler
The Search Scheduler in WSS 3.0 can only perform full crawls. This may limit when you can run crawls due to the amount of network resources that may be required. MOSS 2007 introduces the incremental crawl which can be scheduled at practically any interval. This way you can run full crawls during slower network hours and do incremental crawls during the day.



Property Management
You have full control over property management with MOSS 2007. The property management applies to both SharePoint content and external content.
There are two types of properties:


· Crawled: discovered by search index service component when crawling content
· Managed: mapped by administrator from crawled to managed to make a part of user search experience

When a user adds a column to a list and specifies a value for a list item, indexer will find this property on the next incremental crawl (the property becomes crawled).

After administrator promotes the property to managed, full crawl needs to occur for correct search results to appear

Free E-Learning Voucher

Official Microsoft E-Learning provides you with a cost-effective, flexible, and easy way to build your skills on Microsoft technologies. Choose from more than 1,400 hours of training for IT professionals and developers on the latest products, including Windows Vista, Microsoft Office, Microsoft Office SharePoint Server, Windows Server, Microsoft SQL Server, and Microsoft Visual Studio. Microsoft also offers more than 200 hours of training for home and office users.

Developed by Microsoft technology experts, each course quickly provides you with the critical knowledge you need to excel at your job. Available online, 24 hours a day and seven days a week, the modular lesson format allows you to learn where you want and at your own pace. Take advantage of interactive online features that give you the flexibility to acquire new skills in the way that best suits your learning style.

For a limited time, you can try a free Official Microsoft E-Learning course!

Register to receive a promotional code that you can redeem for one free e-learning course.

Register for the free e-learning course offer

Offer details

This offer is limited to one individual Official Microsoft E-Learning course per person and does not apply to course collections, groups of courses, or any large legacy course that has 12 or more hours of training. The promotional code expires 30 days after you register. This offer expires on June 30, 2008.