Query members

Represents the base class for executing search queries by using the SharePoint Server 2013 query object model, and defines the properties and methods that are used by the KeywordQuery class.

The Query type exposes the following members.

Constructors

  Name Description
Public method Query(ServerContext) Initializes a new instance of the Query class, based on the specified service application.
Public method Query(SPSite) Initializes a new instance of the Query class, based on the specified site.
Public method Query(SPWeb) Initializes a new instance of the Query class, based on the specified SharePoint page.
Public method Query(SearchServiceApplicationProxy) Initializes a new instance of the Query class based on the specified Search service application.

Top

Properties

  Name Description
Public property AuthenticationType Gets or sets the authentication type for the query.
Public property BlockDedupeMode Sets the de-duplication mode for result block ranking.
Public property BypassResultTypes Gets or sets a Boolean value that indicates whether the ResultTypes obtained from the search results should be used or overridden.
Public property ClientType Specifies the name of the client which issued the query.
Public property Culture Gets or sets the locale for the query.
Public property Culture_Client Gets or sets an integer that represents the CultureInfo.
Public property DesiredSnippetLength Gets or sets the preferred summary length.
Public property DirectServiceEndpointUri Gets or sets the address the Search service application proxy should use instead of the URL that was specified in the constructor for the Search service application proxy.
Public property EnableInterleaving A Boolean value that specifies whether the ResultTable objects in the ResultTableCollection produced by running this query should be interleaved. The default value is true.
Public property EnableNicknames Gets or sets a Boolean value that specifies whether the exact terms in the search query are used to find matches, or if nicknames are used as well.
Public property EnableOrderingHitHighlightedProperty A Boolean value that specifies whether the hit highlighted properties should be ordered by hit highlighted terms.
Public property EnablePhonetic Gets or sets a Boolean value that specifies whether the phonetic forms of the query terms are used to find matches.
Public property EnableQueryRules A Boolean value that specifies whether Query Rules are enabled for this query. The default value is true.
Public property EnableStemming Gets or sets a Boolean value that specifies whether stemming is enabled.
Public property GenerateBlockRankLog A Boolean value that specifies whether to return information on the rank log for the result block via the BlockRankLog property of the interleaved result table.
Public property HighlightedSentenceCount Gets or sets the number of sentences to include in the hit highlighted summary. The value should be between 1 and 10.
Public property Hint Gets or sets the suggested query processor behavior for the query. No hint is provided by default.
Public property HitHighlightedMultivaluePropertyLimit Represents a multi-valued hit highlighted property limit.
Public property HitHighlightedProperties Gets the collection of hit highlighted properties for the query.
Public property HitHighlightedProperties_Client Returns a collection of hit highlighted properties.
Public property IgnoreAllNoiseQuery Gets or sets a Boolean value that specifies whether the search query should run if the query text contains only noise words.
Public property IgnoreSafeQueryPropertiesTemplateUrl Gets or sets a flag that indicates whether the SafeQueryPropertiesTemplateUrl property should be ignored.
Public property ImpressionID Gets or sets the identifier (ID) of the page impression.
Public property KeywordInclusion Gets or sets a value that specifies whether the query returns results that contain all or any of the specified search terms.
Public property MaxSnippetLength Specifies the maximum length of the result summary.
Public property PagingCookie Represents the client side cookie used for paging through the search results.
Public property PartitionId Specifies the unique identifier (ID) of the index partition to use for this search query.
Public property PersonalizationData Gets or sets the user personalization data for the current user who submitted the search query.
Public property PersonalizationData_Client Gets the user personalization data and sets the unique identifier (ID) for the current user who submitted the search query.
Public property Priority Gets or sets the priority of the query.
Public property ProcessBestBets A Boolean value that determines whether Best Bets are enabled.
Public property ProcessPersonalFavorites A Boolean value that determines whether personal favorites data is processed.
Public property Properties Gets the query property bag.
Public property QueryInfo Get the query log data for a single click-through for a search query.
Public property QueryTag Gets or sets any custom tags to be used to identify the query. Multiple tags are separated by semicolons.
Public property QueryTemplate Specifies the query template that is used at run time to transform the query based on user input.
Public property QueryTemplateParameters Represents the parameters in the query template.
Public property QueryText Gets or sets the text for the search query.
Public property RankingModelId Gets or sets the identifier (ID) of the ranking model to use for the query.
Public property ResultsProvider Gets or sets the search provider to use for the search query
Public property ResultsUrl Gets or sets the results page URL of the query.
Public property ResultTypes Obsolete. Gets or sets a value that specifies the search result type.
Public property RowLimit Gets or sets the maximum number of rows returned in the search results, at the index specified by the StartRow() property.
Public property RowsPerPage Gets or sets the number of search results to return per page.
Public property SafeQueryPropertiesTemplateUrl Specifies the location of the QueryProperties template. This property must be specified when issuing a query by a user who does not have UseRemoteAPIs() permission enabled. If the query will not run without UseRemoteAPIs() permission enabled, you can set the IgnoreSafeQueryPropertiesTemplateUrl property to true instead.
Public property ShowPeopleNameSuggestions Specifies whether to generate name suggestions.
Public property Site Gets the site from where the search query is run from.
Public property SiteContext Gets or sets the site URL for the search query.
Public property SourceId Specifies the identifier (ID) of the result source to be used to run the query.
Public property StartRow Gets or sets first row included in the search results.
Public property SummaryLength Gets or sets the length of the search result summary.
Public property Timeout Gets or sets the amount of time, in milliseconds, before the query request times out.
Public property TotalRowsExactMinimum Used by SearchPagingWebPart to determine the minimum value required for rendering page links.
Public property TrimDuplicates Gets or sets a Boolean value that specifies whether duplicate items should be removed from the search results.
Public property UILanguage Specifies the UI language.
Public property UrlZone Gets the originating URL zone for the query request.

Top

Methods

  Name Description
Public method Dispose Disposes the instance of the Query class.
Public method Equals (Inherited from Object.)
Public method Execute Obsolete. Executes the search query.
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Public method GetProperties Returns information about managed properties.
Public method GetQuerySuggestions Returns a list of query suggestions matching the search terms typed in the search box.
Public method GetQuerySuggestionsWithResults Returns a list of query suggestions matching the search terms typed in the search box.
Public method GetScopes Returns information about SharePoint 2010 search scopes, where applicable.
Public method GetType (Inherited from Object.)
Public method HighlightStringValue Highlights all the occurrences of the specified query terms in a string.
Protected method MemberwiseClone (Inherited from Object.)
Protected method SetConfigurableDefaults Transfers query specific configuration settings from the Search service application to override default values in the Query.
Protected method SetDefaults Sets the SharePoint Server context default objects, to be used for the Query.
Public method ToString (Inherited from Object.)

Top

See also

Reference

Query class

Microsoft.Office.Server.Search.Query namespace