Share-n-dipity

SharePoint serendipity is the effect by which one accidentally discovers something fortunate, especially while looking for something else entirely. In this case, it is the occassional musings, observations, and Ouija board readings about the phabulously

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

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

  • Comments 1
  • Likes

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.

 

Comments
  • Hey Steve,

    Just a wild guess here but I reckopn default will be spsearch, SharePointSerach will be Osearch and than FastSearch...who knows ;-)

    Niels

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment