Class SearchOptions | Azure SDK for .NET
Parameters for filtering, sorting, faceting, paging, and other search query behaviors.
Inheritance
System.Object
SearchOptions
Namespace: System.Dynamic.ExpandoObject
Assembly: Azure.Search.Documents.dll
Syntax
public class SearchOptions
Constructors
SearchOptions()
Initializes a new instance of SearchOptions.
Declaration
public SearchOptions ();
Properties
Facets
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.
Declaration
public System.Collections.Generic.IList<string> Facets { get; }
Property Value
System.Collections.Generic.IList<System.String> |
Filter
The OData $filter expression to apply to the search query. You can use Create(FormattableString) to help construct the filter expression.
Declaration
public string Filter { get; set; }
Property Value
System.String |
HighlightFields
The list of field names to use for hit highlights. Only searchable fields can be used for hit highlighting.
Declaration
public System.Collections.Generic.IList<string> HighlightFields { get; }
Property Value
System.Collections.Generic.IList<System.String> |
HighlightPostTag
A string tag that is appended to hit highlights. Must be set with highlightPreTag. Default is </em>.
Declaration
public string HighlightPostTag { get; set; }
Property Value
System.String |
HighlightPreTag
A string tag that is prepended to hit highlights. Must be set with highlightPostTag. Default is <em>.
Declaration
public string HighlightPreTag { get; set; }
Property Value
System.String |
IncludeTotalCount
A value that specifies whether to fetch the total count of results as the TotalCount property. The default value is false. Setting this value to true may have a performance impact. Note that the count returned is an approximation.
Declaration
public Nullable<bool> IncludeTotalCount { get; set; }
Property Value
System.Nullable<System.Boolean> |
MinimumCoverage
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.
Declaration
public Nullable<double> MinimumCoverage { get; set; }
Property Value
System.Nullable<System.Double> |
OrderBy
The list of OData $orderby expressions by which to sort the results. Each expression can be either a field name or a call to either the geo.distance() or the search.score() functions. Each expression can be followed by asc to indicate ascending, or 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.
Declaration
public System.Collections.Generic.IList<string> OrderBy { get; }
Property Value
System.Collections.Generic.IList<System.String> |
QueryAnswer
A value that specifies whether Answers should be returned as part of the search response.
Declaration
public Nullable<Azure.Search.Documents.Models.QueryAnswerType> QueryAnswer { get; set; }
Property Value
QueryAnswerCount
A value that specifies the number of Answers that should be returned as part of the search response.
Declaration
public Nullable<int> QueryAnswerCount { get; set; }
Property Value
System.Nullable<System.Int32> |
QueryCaption
A value that specifies whether Captions should be returned as part of the search response.
The default value is None.
Declaration
public Nullable<Azure.Search.Documents.Models.QueryCaptionType> QueryCaption { get; set; }
Property Value
QueryCaptionHighlightEnabled
Declaration
public Nullable<bool> QueryCaptionHighlightEnabled { get; set; }
Property Value
System.Nullable<System.Boolean> |
QueryLanguage
A value that specifies the language of the search query.
Declaration
public Nullable<Azure.Search.Documents.Models.QueryLanguage> QueryLanguage { get; set; }
Property Value
QuerySpeller
A value that specifies the type of the speller to use to spell-correct individual search query terms.
Declaration
public Nullable<Azure.Search.Documents.Models.QuerySpellerType> QuerySpeller { get; set; }
Property Value
QueryType
A value that specifies the syntax of the search query. The default is 'simple'. Use 'full' if your query uses the Lucene query syntax.
Declaration
public Nullable<Azure.Search.Documents.Models.SearchQueryType> QueryType { get; set; }
Property Value
ScoringParameters
The list of parameter values to be used in scoring functions (for example, referencePointParameter) using the format name-values. For example, if the scoring profile defines a function with a parameter called 'mylocation' the parameter string would be "mylocation--122.2,44.8" (without the quotes).
Declaration
public System.Collections.Generic.IList<string> ScoringParameters { get; }
Property Value
System.Collections.Generic.IList<System.String> |
ScoringProfile
The name of a scoring profile to evaluate match scores for matching documents in order to sort the results.
Declaration
public string ScoringProfile { get; set; }
Property Value
System.String |
ScoringStatistics
A value that specifies whether we want to calculate scoring statistics (such as document frequency) globally for more consistent scoring, or locally, for lower latency. The default is 'local'. Use 'global' to aggregate scoring statistics globally before scoring. Using global scoring statistics can increase latency of search queries.
Declaration
public Nullable<Azure.Search.Documents.Models.ScoringStatistics> ScoringStatistics { get; set; }
Property Value
SearchFields
The list of field names to which to scope the full-text search. When using fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each fielded search expression take precedence over any field names listed in this parameter.
Declaration
public System.Collections.Generic.IList<string> SearchFields { get; }
Property Value
System.Collections.Generic.IList<System.String> |
SearchMode
A value that specifies whether any or all of the search terms must be matched in order to count the document as a match.
Declaration
public Nullable<Azure.Search.Documents.Models.SearchMode> SearchMode { get; set; }
Property Value
Select
The list of fields to retrieve. If unspecified, all fields marked as retrievable in the schema are included.
Declaration
public System.Collections.Generic.IList<string> Select { get; }
Property Value
System.Collections.Generic.IList<System.String> |
SemanticConfigurationName
The name of a semantic configuration that will be used when processing documents for queries of type semantic.
Declaration
public string SemanticConfigurationName { get; set; }
Property Value
System.String |
SemanticFields
The list of field names used for semantic search.
Declaration
public System.Collections.Generic.IList<string> SemanticFields { get; }
Property Value
System.Collections.Generic.IList<System.String> |
SessionId
A value to be used to create a sticky session, which can help getting more consistent results. As long as the same sessionId is used, a best-effort attempt will be made to target the same replica set. Be wary that reusing the same sessionID values repeatedly can interfere with the load balancing of the requests across replicas and adversely affect the performance of the search service. The value used as sessionId cannot start with a '_' character.
Declaration
public string SessionId { get; set; }
Property Value
System.String |
Size
The number of search results to retrieve. This can be used in conjunction with Skip to implement client-side paging of search results. If results are truncated due to server-side paging, the response will include a continuation token that can be used to issue another Search request for the next page of results.
Declaration
public Nullable<int> Size { get; set; }
Property Value
System.Nullable<System.Int32> |
Skip
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.
Declaration
public Nullable<int> Skip { get; set; }
Property Value
System.Nullable<System.Int32> |
ncG1vNJzZmiZqqq%2Fpr%2FDpJuom6Njr627wWeaqKqVY8SqusOorqxmnprBcHDWnplonJ%2Bpu6bAjnqxrqqVY6CmrdGcn2d8n5jCrrHNrapoaWFjgW98jJucrZlebnyivMhoeLOtopp7lLHAq5qhZnSksLa5xKerrGdxr8KzsY2MnJqqk517hbvCrqSepqSoe5SxwKuaoYegqbawutJnn62lnA%3D%3D