Refiner Specification in the Query Web Service and Query Object Model
Learn about specifying refiners in the Query Web service or Query object model.
When querying FAST Search Server 2010 for SharePoint, you can specify which refiners and what type of refinement data to return in the query result.
Applies to: SharePoint Server 2010
Specifying Refiners Using the Query Web Service or Query Object Model
If you use the Query Web service, you specify the requested query refiners by using the Refiner Element in Microsoft.Search.Query Schema. For more information, see Using Refiners in the Query Web Service.
If you use the Query object model, you specify the requested query refiners by using the Refiners property of the KeywordQuery class. You use the following syntax to specify the requested query refiners:
<refiner>[,<refiner>]*
In both cases each individual refiner specification has the following format:
<refiner-name>[(parameter=value[,parameter=value]*)]?
Where:
<refiner-name> is the name of the managed property associated with the refiner.
The optional list of parameter=value pairs specifies non-default configuration values for the named refiner. If a parameter for a refiner is not listed inside the parentheses, the index schema configuration gives you the default setting. For more information, see Index Schema (FAST Search Server 2010 for SharePoint).
Table 1 lists the valid parameters for the refiners.
Table 1. Valid parameters for refiners (FAST Search Server 2010 for SharePoint)
Parameter |
Description |
---|---|
deephits |
Overrides the default number of hits that is used as the basis for deep refinement computation. This will impact the search performance. Syntax deephits=<integer value> Example price(deephits=1000) Note This limit applies within each search partition inside the search rows or columns. The actual number of hits that are evaluated will be larger than this value due to the result aggregation across search partitions. |
discretize |
Specifies custom intervals (refinement bins) for numeric refiners. Syntax discretize=manual/<threshold>/<threshold>[/<threshold>]* The <threshold> attribute specifies the threshold for each refinement bin. There is one interval for everything below the first threshold specified, one interval between each consecutive threshold, and one interval for everything above the last threshold. For a refiner of type Datetime, specify the threshold according to the following ISO 8601-compatible formats:
The format values specify the following:
Important All date/time values must be specified according to the UTC (Coordinated Universal Time), also known as GMT (Greenwich Mean Time) time zone. The UTC time zone identifier (a trailing "Z" character) is optional. |
sort |
Defines how to sort the bins within a string refiner. Syntax sort=<property>/<direction> The attributes do the following:
Example sort=frequency/descending Default: frequency/descending. |
filter |
Defines how bins within a refiner of type String are filtered before they are returned to the client. Syntax filter=<bins>/<freq>/<prefix>[<levels>] The attributes do the following:
|
cutoff |
Limits the amount of data that must be transferred and processed for deep string refiners. The refiners can be configured to return only the most relevant values (bins). Note This cutoff filtering is performed within each query matching server. This is different from the filter parameter, which performs result-side filtering only. You can combine the two parameters. Syntax cutoff=<frequency>/<minbins>/<maxbins> The attributes do the following:
Note Use <frequency> and <minbins> with care; we recommend using only <maxbins>. |
The following example specifies a query refiner for the last modified date:
write(discretize=manual/2010-01-01/2010-08-22/2010-09-15/2010-09-21/2010-09-22)
The write refiner is associated with the managed property that contains the last modified date for the items. This refiner specifies fixed size date/time bins, where the last bin (2010-09-22) should represent the current date when the query is issued. The specified bins can then be used as a basis to represent refinement bins for today, yesterday, last week, last month, last year and older.
If you want to adapt to the user's time zone, you can specify the bins with full date/time representation.
Note
The refiner names must be in lowercase letters in the specification.
See Also
Concepts
Using Refiners in the Query Web Service