More on Migrating Search Settings

Posted Tuesday, October 16, 2007 4:18 PM by C-Dog's .NET Tip of the Day

A while back I posted about SSPPC, a utility on CodePlex to import and export Enterprise Search settings. After using this utility more I thought I would post an update. Most of the troubles you might run into are during importing. Most of this is due to the fact that things happen to work in a certain order. Don't bother using the Import Settings bat file because more than likely it will not work. The application will just throw an exception so don't expect a friendly error. Most of the time there is enough info to figure it out though.

I am going to talk about content sources for the BDC specifically today. First thing you have to do is import all of your BDC application definitions. If you dont do this, when you try to import the content sources, it will fail because they do not exist. Once you have done that, go ahead and import the content sources. The easiest way is to just copy the command line out of the import batch file. If that runs successfully, all of your content sources will be there. One thing to not is that, the checkbox for the LOB System that the content source maps to will not show up checked. However, strangely enough everything usually works when you start crawling.

The command line to import content sources by default includes a parameter to initiate a full crawl. This is necessary so that your crawled properties will exist. Be sure and wait for it to finish. I have attempted to do the crawled property import but as the product says it is in beta and probably will not work (as was gthe case for me).

Once your crawl is finished, you will have crawled properties. Now you just need to import your managed properties. Copy the managed property line from the import batch file and execute it. This line will import your managed properties as well as which crawled properties they map to. This is a huge time saver, since mapping properties is very slow and cumbersome.

One thing to note is that you do not have to worry about the product importing duplicate scopes, properties, etc. It is smart enough to check and see if it exists first before creating a new one.

After all of that, you can import scopes using the last line from the batch file. Once your scopes are imported and updated, you should be good to go with Enterprise Search. All in all this is a very handy utility and it should save you a ton of time as you move Enterprise Search between environments.

Read the complete post at http://www.dotnettipoftheday.com/blog.aspx?id=389