Search​Parameters Class

Definition

Parameters for filtering, sorting, faceting, paging, and other search query behaviors.

public class SearchParameters
Inheritance
SearchParameters

Constructors

Search​Parameters()

Initializes a new instance of the SearchParameters class.

Properties

Facets

Gets or sets the list of facet expressions to apply to the search query. Each facet expression contains a field name, optionally followed by a comma-separated list of name:value pairs.

Filter

Gets or sets the OData $filter expression to apply to the search query.

Highlight​Fields

Gets or sets the list of field names to use for hit highlights. Only searchable fields can be used for hit highlighting.

Highlight​Post​Tag

Gets or sets a string tag that is appended to hit highlights. Must be set with HighlightPreTag. Default is </em>.

Highlight​Pre​Tag

Gets or sets a string tag that is prepended to hit highlights. Must be set with HighlightPostTag. Default is <em>.

Include​Total​Result​Count

Gets or sets a value that specifies whether to fetch the total count of results. Default is false. Setting this value to true may have a performance impact. Note that the count returned is an approximation.

Minimum​Coverage

Gets or sets a number between 0 and 100 indicating the percentage of the index that must be covered by a search query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 100.

Order​By

Gets or sets the list of OData $orderby expressions by which to sort the results. Each expression can be either a field name or a call to the geo.distance() function. Each expression can be followed by asc to indicate ascending, and desc to indicate descending. The default is ascending order. Ties will be broken by the match scores of documents. If no OrderBy is specified, the default sort order is descending by document match score. There can be at most 32 Orderby clauses.

Query​Type

Gets or sets a value that specifies the syntax of the search query. The default is 'simple'. Use 'full' if your query uses the Lucene query syntax. Possible values for this property include: 'simple', 'full'.

Scoring​Parameters

Gets or sets the list of parameter values to be used in scoring functions (for example, referencePointParameter). Each parameter is a name/value pair encapsulated in a ScoringParameter object.

Scoring​Profile

Gets or sets the name of a scoring profile to evaluate match scores for matching documents in order to sort the results.

Search​Fields

Gets or sets the list of field names to include in the full-text search.

Search​Mode

Gets or sets a value that specifies whether any or all of the search terms must be matched in order to count the document as a match. Possible values for this property include: 'any', 'all'.

Select

Gets or sets the list of fields to retrieve. If unspecified, all fields marked as retrievable in the schema are included.

Skip

Gets or sets the number of search results to skip. This value cannot be greater than 100,000. If you need to scan documents in sequence, but cannot use Skip due to this limitation, consider using OrderBy on a totally-ordered key and Filter with a range query instead.

Top

Gets or sets the number of search results to retrieve. This can be used in conjunction with Skip to implement client-side paging of search results.

Methods

To​String()

Converts the SearchParameters instance to a URL query string.