Determine if a SharePoint 2010 Search Service Application is FAST Search or SharePoint Search

One of the things that may be useful to know when you are writing custom search applications for SharePoint 2010 is whether the search service application you are working with is FAST Search for SharePoint or SharePoint Search.  Fortunately the object model provides a fairly straightforward way to do this once you know where to look.  Assuming you have a reference to a SearchServiceApplication instance, you can check the DefaultSearchProvider property to figure out if it is for FAST Search or SharePoint Search.  The property is just an enumerator so it’s pretty easy to use.  Here’s a simple example (where serviceApp is an existing instance of a SearchServiceApplication): 

if (serviceApp.DefaultSearchProvider == SearchProvider.FASTSearch)

…do something

The enum for DefaultSearchProvider is FASTSearch, SharepointSearch, and Default.  In all honesty I couldn’t tell you what Default is, sorry.

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s