Online Training On SharePoint

Thursday, 4 March 2010

Creating a Scope in FAST Search for SharePoint 2010

I was working on a requirment where we were using the FAST Search for SharePoint 2010 and we need to create a scope based on a Content Source. This is quite easy while working with SharePoint Search but it is little confusing with the FAST search. We need to create the content source in the FAST Search Connector SSA and the scope needs to be created in the Fast Query SSA. But there is no way possible from SharePoint Central Admin UI where we can set the scope to use the content source from FAST Search Connector. If we try to set the rule in scope from FAST Query SSA it will not show the content source created in the FAST Connector SSA. To do this we need to use PowerShell script and need to create a FQL Filter for this:
Here are the steps to do this:

1. Create a content scope in the FAST Content SSA. I have created a content source with the name FASTContentSource.
2. Now we need to run the following PowerShell command:
New-SPEnterpriseSearchQueryScope -SearchApplication "FAST Search Query" FASTDemoScope -Description "Content Source Demo Scope" -DisplayInAdminUI 1 -ExtendedSearchFilter contentsource:FASTContentSource

Here Search Application should be the FAST Query SSA. The DisplayInAdminUI determines whether this scope is visible in the Central Administration. The ExtendedSearchFilter create the FQL Filter which determines which rule needs to be assoicated with this scope. In my case I am creating a filter based on a content source.
3. Once this is done a scope will be created in the FAST Query SSA.
4. We need to wait for the scope to be compiled or we can start manually the compilation.
5. The strange thing is even after compilation on the UI the scope will not show any rules or any Items. The number of items would be empty as well rules will be empty.
6. Once this is done the scope is ready to be queried. To scope against this query we need to use the following syntax in the search box:
query scope:FASTContentSource

We can also create the FQL filtering on the existing scopes by using the following query:
$DemoScope = Get-SPEnterpriseSearchQueryScope -SearchApplication "FAST Query SSA" -Identity FASTDemoScope
$Demoscope.Filter = 'contentsource:"FASTContentSource"'

Same way we can also set up other FQL filters. Suppose we want to see only results having some specific Author we can set a filter like
$DemoScope.Filter = "Author:MyAuthor"
Post a Comment
Related Posts with Thumbnails