FAST Search Query Integration Overview

The two Enterprise Search options in Microsoft SharePoint Server 2010—Microsoft FAST Search Server 2010 for SharePoint and Microsoft SharePoint Server 2010 search—are designed to share a common platform to enable search solution developers to use the same query-side interfaces.

Developers can take advantage of the same object models, services, and a common query language instead of having to learn new APIs or programming models.

In this article
FAST Search Extensions
Using the Query Web Service
Using the Query Object Model
Supported Query Languages
Restricting Search Results Using Search Scopes

This topic describes features and considerations that apply only when you are querying FAST Search Server 2010 for SharePoint, as follows:

For a general overview of the SharePoint Server 2010 query integration framework, see Enterprise Search Query Architecture.

Applies to: SharePoint Server 2010

FAST Search Extensions

FAST Search Server 2010 for SharePoint includes many extensions that are available via the object models and the Query web service, as follows:

Developers of search-driven solutions and applications can take advantage of a common platform and common APIs for both FAST Search Server 2010 for SharePoint and SharePoint Server search. This means that you can build applications to support both search engines. You can extend the applications if and when you need to take advantage of the more advanced features that are available with FAST Search Server 2010 for SharePoint, such as dynamic ranking, sort by formula, or deep refiners for insight into your full result set.

Using the Query Web Service

You access the Query web service as specified in Using the Query Web Service. There are two methods you can use to access the Query Web service:

  • The QueryEx method returns a set of results in a DataSet object for the specified query. This is the recommended query method for FAST Search Server 2010 for SharePoint, and enables use of all query features.

  • The Query method returns an XML string that contains the search results set for the specified query. This is a legacy method that also supports basic queries against FAST Search Server 2010 for SharePoint. To access the advanced features of FAST Search Server 2010 for SharePoint, you should instead use the QueryEx method.

Table 1 provides a list of the most important Query Web service schema elements with different behavior for FAST Search Server 2010 for SharePoint and SharePoint Server search.

Note

The information in Table 1 applies when you specify FASTSearch as the result provider in the ResultProvider Element in Microsoft.Search.Query Schema. For people search queries, specify SharePointSearch as the result provider even if you use FAST Search Server 2010 for SharePoint as your SharePoint Server 2010 Enterprise Search option. The Query Search Service Application (SSA) handles people search queries, and supports the same query options as SharePoint Server search.

Table 1. Query Web service schema elements with different behavior for FAST Search Server 2010 for SharePoint and SharePoint Server search

Schema Element

Description

QueryText

For FAST Search Server 2010 for SharePoint, you can specify an additional query type FQL.

SortByProperties

For FAST Search Server 2010 for SharePoint, you can specify additional sorting and ranking options. For more information, see Ranking and Sorting (FAST Search Server 2010 for SharePoint).

RelevanceModel

This element is not used in context of FAST Search Server 2010 for SharePoint. Instead, specify a rank profile as part of the SortByProperties element. You can also impact rank calculation in the query.

For more information, see Ranking and Sorting (FAST Search Server 2010 for SharePoint).

TrimDuplicates

For FAST Search Server 2010 for SharePoint, you can specify additional options for duplicate removal. For more information, see Duplicate Removal (FAST Search Server 2010 for SharePoint).

IgnoreAllNoiseQuery

This element is not applicable to FAST Search Server 2010 for SharePoint and is ignored.

IncludeHighConfidenceResults

This element is not applicable to FAST Search Server 2010 for SharePoint and is ignored.

HighlightQuerySuggestions

This element is not applicable to FAST Search Server 2010 for SharePoint and is ignored.

CapitalizeFirstLetters

This element is not applicable to FAST Search Server 2010 for SharePoint and is ignored.

EnableSpellcheck

For FAST Search Server 2010 for SharePoint, you can specify how spelling corrections and suggestions are handled for a query. For more information, see Linguistic Query Features (FAST Search Server 2010 for SharePoint).

ResubmitFlags

For FAST Search Server 2010 for SharePoint, you can specify how to handle queries with zero results. By using this element, you can specify an automatic resubmit of the query with additional query features enabled.

UserContext

For FAST Search Server 2010 for SharePoint, you can specify user context data associated with search settings (best bets, visual best bets, and keyword boosting). For more information, see Keyword Management (FAST Search Server 2010 for SharePoint).

FindSimilar

For FAST Search Server 2010 for SharePoint, you can search for results that are similar to already retrieved results. For more information, see Find Similar (FAST Search Server 2010 for SharePoint).

IncludeRefinementResults

For FAST Search Server 2010 for SharePoint, you can control how to return query refinement information in the query results. For more information, see Query Refinement (FAST Search Server 2010 for SharePoint).

RefinementFilters

For FAST Search Server 2010 for SharePoint, you can request a specific query refinement aggregation by adding a RefinementToken string from the returned data of a previous query. For more information, see Query Refinement (FAST Search Server 2010 for SharePoint).

Using the Query Object Model

You access the object model as specified in Enterprise Search Query Architecture.

When using the Query object model, you specify the query string by using the QueryText property of the KeywordQuery class. The default query type is keyword query syntax. You set the EnableFQL property to enable the FAST Query Language (FQL) as the query language.

Supported Query Languages

FAST Search Server 2010 for SharePoint supports the keyword query syntax in Microsoft SharePoint Server 2010 but not the FullTextSQL query syntax. You can also use FQL to define more complex queries.

Keyword Syntax Query Language

The keyword query syntax is the query language that is common to FAST Search Server 2010 for SharePoint and SharePoint Server search.

We recommend that you use the keyword query syntax as a container for the query text added by the user in a search box.

You can use the property filters on all managed properties. However, it may be more convenient to specify property filters that apply to multiple queries by using the search scope feature.

If you are creating an application that is intended for use with both FAST Search Server 2010 for SharePoint and SharePoint Server search, you should use keyword query syntax.

FAST Query Language (FQL)

FQL is a query language intended for creating queries programmatically. It is a structured language that is not intended to be exposed to end-users. FQL can be used only for solutions developed for FAST Search Server 2010 for SharePoint.

Some FAST Search Server 2010 for SharePoint features are exposed only through this query language, for example:

  • Detailed control of ranking at query time, by using RANK operators or XRANK operators, query term weighting, and switching on or off ranking for parts of a query.

  • Advanced proximity operators (ordered or unordered NEAR operators).

  • Complex combinations of query operators, such as nesting of Boolean operators

For more information, see FAST Query Language (FQL) Syntax Reference.

Important

When using FQL as the query language, you cannot use the FAST Search Server 2010 for SharePoint keyword management features (such as promotions or demotions). If you use FQL only in search scope definitions, this limitation does not apply.

FQL can be used only when integrating via the Query object model and the Query XML Web service. It is not exposed in the SharePoint search Web Parts.

FQL uses UTC syntax for all date and time expressions. This is different from keyword query syntax, where date and time expressions are relative to the user's time zone (given by the locale).

How to Handle the User Query

The user query is a sequence of query terms typed in a single query box by a user. In most cases the user types one or more words. However, the user query may also include special characters such as the plus ("+") and minus ("-") signs.

The user query is usually treated as a string that is passed transparently by the query client.

You can pass the user query on the query client interface in two main ways:

  • Pass the user query as a keyword query syntax query string.

    This option enables advanced users to express a more specific query by using a set of basic query controls that are exposed by the keyword query syntax.

    Property filters added by the search application can be appended to the query string or appended as a search scope expression (scope:scopename) in the query string.

    This option enables you to use your query application together with both FAST Search Server 2010 for SharePoint and SharePoint Server search. You can still use certain advanced FAST Search Server 2010 for SharePoint query features by using the search scope option (which can be transparent to your search application).

  • Pass the user query as an FQL Simple Query Language string within an FQL query expression. You encapsulate the end-user query string in FQL, and can add any other property filter or other query constraints in the FQL query expression.

    Important

    The FQL Simple Query Language syntax supports fewer features for the user than the keyword query syntax.

Restricting Search Results Using Search Scopes

A search scope is a predefined property filter expression that you can use to limit a query. An integrator can append a search scope in a keyword syntax query by using the special property filter scope:scopename, where scope is a predefined property name and scopename is the name of the defined search scope.

In FAST Search Server 2010 for SharePoint, a generated search scope represents a predefined property filter that is specified in FQL syntax. You can specify a search scope via the SharePoint Server Site Administration UI, by using the Windows PowerShell interface, or by using the Scope interface in the SharePoint Server search Administration object model. When using the Windows PowerShell interface or the Scope interface, you can specify the scope filter as a string according to the FQL query syntax. A search scope does not affect the index or index schema.

Note

FAST Search Server 2010 for SharePoint and handles search scopes differently. For FAST Search Server 2010 for SharePoint as scope is purely a query-time feature.

A scope filter can consist of any FQL syntax, and is equal to an FQL expression enclosed in an FQL FILTER operator.

If you want to specify only a nondefault full-text index in the search scope filter, you can use the special scope filter syntax, as follows.

FullTextIndex=<name of full-text index>

Important

You can use the special full-text index scope filter syntax only when you define search scope filters. It is not valid FQL syntax.

See Also

Concepts

Query Refinement (FAST Search Server 2010 for SharePoint)

Ranking and Sorting (FAST Search Server 2010 for SharePoint)

Linguistic Query Features (FAST Search Server 2010 for SharePoint)

Managed Properties and Data Types (FAST Search Server 2010 for SharePoint)

Keyword Management (FAST Search Server 2010 for SharePoint)

Find Similar (FAST Search Server 2010 for SharePoint)

Duplicate Removal (FAST Search Server 2010 for SharePoint)

Walkthrough: Querying FAST Search Server From a Client Application