2.2.4.11 QueryProperties

msdn link

Namespace: http://www.microsoft.com/sharepoint/search/KnownTypes/2008/08

The QueryProperties complex type contains information common to all types of search queries. The QueryProperties data type is extended by the KeywordQueryProperties data type, as specified in section 3.1.4.7.3.1, and the FullTextSqlQueryProperties data type, as specified in section 2.2.4.7.

 <xs:complexType name="QueryProperties" xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <xs:sequence>
     <xs:element minOccurs="0" name="AlertInfo" nillable="true" type="q2:AlertInfo"/>
     <xs:element xmlns:tns5="http://schemas.datacontract.org/2004/07/Microsoft.Office.Server.Search.Query" minOccurs="0" name="AuthenticationType" type="tns5:QueryAuthenticationType"/>
     <xs:element minOccurs="0" name="CorrelationId" type="ser:guid"/>
     <xs:element minOccurs="0" name="EnableNicknames" type="xs:boolean"/>
     <xs:element minOccurs="0" name="EnablePhonetic" type="xs:boolean"/>
     <xs:element minOccurs="0" name="EnableStemming" type="xs:boolean"/>
     <xs:element minOccurs="0" name="FarmId" type="ser:guid"/>
     <xs:element xmlns:tns5="http://schemas.datacontract.org/2004/07/Microsoft.Office.Server.Search.Query" minOccurs="0" name="Hint" type="tns5:QueryHint"/>
     <xs:element xmlns:q3="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="HitHighlightedProperties" nillable="true" type="q3:ArrayOfanyType"/>
     <xs:element minOccurs="0" name="IgnoreAllNoiseQuery" type="xs:boolean"/>
     <xs:element xmlns:tns5="http://schemas.datacontract.org/2004/07/Microsoft.Office.Server.Search.Query" minOccurs="0" name="KeywordInclusion" type="tns5:KeywordInclusion"/>
     <xs:element minOccurs="0" name="Locale" type="xs:int"/>
     <xs:element minOccurs="0" name="MergeWithDefaultPartition" type="xs:boolean"/>
     <xs:element minOccurs="0" name="OLSQuerySession" nillable="true" type="xs:string"/>
     <xs:element xmlns:tns5="http://schemas.datacontract.org/2004/07/Microsoft.Office.Server.Search.Query" minOccurs="0" name="PagingCookie" nillable="true" type="tns5:PagingCookie"/>
     <xs:element minOccurs="0" name="PartitionId" type="ser:guid"/>
     <xs:element minOccurs="0" name="PersonalizationData" nillable="true" type="q2:QueryPersonalizationData"/>
     <xs:element minOccurs="0" name="QueryText" nillable="true" type="xs:string"/>
     <xs:element minOccurs="0" name="RankingModelId" nillable="true" type="xs:string"/>
     <xs:element xmlns:tns5="http://schemas.datacontract.org/2004/07/Microsoft.Office.Server.Search.Query" minOccurs="0" name="ResultTypes" type="tns5:ResultType"/>
     <xs:element xmlns:tns5="http://schemas.datacontract.org/2004/07/Microsoft.Office.Server.Search.Query" minOccurs="0" name="ResultsProvider" type="tns5:SearchProvider"/>
     <xs:element minOccurs="0" name="RowLimit" type="xs:int"/>
     <xs:element minOccurs="0" name="RowsPerPage" type="xs:int"/>
     <xs:element minOccurs="0" name="Sid" nillable="true" type="xs:string"/>
     <xs:element minOccurs="0" name="SiteId" type="ser:guid"/>
     <xs:element minOccurs="0" name="StartRow" type="xs:int"/>
     <xs:element minOccurs="0" name="SummaryLength" type="xs:int"/>
     <xs:element minOccurs="0" name="TimeZoneID" type="xs:int"/>
     <xs:element minOccurs="0" name="Timeout" type="xs:int"/>
     <xs:element minOccurs="0" name="TotalRowsExactMinimum" type="xs:int"/>
     <xs:element minOccurs="0" name="TrimDuplicates" type="xs:boolean"/>
     <xs:element xmlns:tns6="http://schemas.datacontract.org/2004/07/Microsoft.SharePoint.Administration" minOccurs="0" name="UrlZone" type="tns6:SPUrlZone"/>
     <xs:element minOccurs="0" name="UseOLSQuery" type="xs:int"/>
     <xs:element minOccurs="0" name="WcfTimeout" type="xs:int"/>
     <xs:element minOccurs="0" name="WebId" type="ser:guid"/>
     <xs:element xmlns:q3="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="Properties" nillable="true" type="q3:ArrayOfKeyValueOfstringanyType"/>
     <xs:element minOccurs="0" name="PropertiesContractVersion" nillable="true" type="xs:string"/>
     <xs:element minOccurs="0" name="RemainingDeserializationSkips" type="xs:int"/>
     <xs:element minOccurs="0" name="SerializedPropertyBag" nillable="true" type="xs:string"/>
     <xs:element minOccurs="0" name="DirectImsEndpointUri" nillable="true" type="xs:anyURI"/>
   </xs:sequence>
 </xs:complexType>

AlertInfo: Specifies information about a search alert. MUST be an AlertInfo data type, as specified in section 2.2.4.4. If the ResultsProvider element of QueryProperties is equal to SearchProvider.FASTSearch, the complex type MUST be ignored by the protocol server.

AuthenticationType: The type of search security descriptor that is used for security trimming. MUST be a QueryAuthenticationType, as specified in section 2.2.5.3. If this element is not present or a value is not specified, a default value of QueryAuthenticationType.NtAuthenticatedQuery MUST be used by the protocol server. If the ResultsProvider element of QueryProperties is equal to SearchProvider.FASTSearch, the complex type MUST be ignored by the protocol server.

CorrelationId: The GUID used to log all the information for a search query in diagnostic logs.

EnableNicknames: Specifies whether the exact tokens in the query text are used to find crawled items or whether the nicknames of the tokens are considered as well. A value of "true" indicates that the protocol server MAY consider nicknames; a value of "false" indicates that the protocol server MUST NOT consider nicknames. If this element is not present or a value is not specified, a default value of "false" MUST be used.

If QueryProperties is extended by the KeywordQueryProperties data type, this element applies to the whole query text.

If QueryProperties is extended by the FullTextSqlQueryProperties data type, this element applies to the FREETEXT predicate in the SharePoint Search SQL syntax, as specified in [MS-SEARCH] section 2.2.12.3.1.2 and section 2.2.13.3.1.2.

If the ResultsProvider element of QueryProperties is equal to SearchProvider.FASTSearch, the complex type MUST be ignored by the protocol server.

EnablePhonetic: Specifies whether the phonetic forms of the given tokens are used to locate crawled items or not. A value of "true" indicates that the protocol server MUST consider phonetic forms; a value of "false" indicates that the protocol server MUST NOT consider the phonetic forms.

If this element is not present or a value is not specified, a default value of "false" MUST be used.

If this element is "true", the protocol server MUST do an inexact match based on heuristics between the phonetic representation of each token against all the values of all the managed properties for which the value of ManagedPropertyInformation.Pronunciation is "true", as specified in section 3.1.1.3.

If QueryProperties is extended by the KeywordQueryProperties data type, this element applies to the whole query text.

If QueryProperties is extended by the FullTextSqlQueryProperties data type, this element applies to the FREETEXT predicate in the SharePoint Search SQL syntax, as specified in [MS-SEARCH] section 2.2.12.3.1.2 and section 2.2.13.3.1.2.

If the ResultsProvider element of QueryProperties is equal to SearchProvider.FASTSearch, the complex type MUST be ignored by the protocol server.

EnableStemming: Specifies whether inflectional forms of the given tokens are used to locate crawled items or not. If this element is "true", the protocol server can use inflectional forms to locate crawled items. If this element is "false", the protocol server MUST NOT use inflectional forms to locate crawled items. For example, if it is set to "true", search queries with the query text "car" return crawled items containing the token "car" or the token "cars", if such items exist.

If this element is not present or a value is not specified, a default value of "false" MUST be used.

If QueryProperties is extended by the KeywordQueryProperties data type, this element applies to the whole query text.

If QueryProperties is extended by the FullTextSqlQueryProperties data type, this element applies to the FREETEXT predicate of the SharePoint Search SQL syntax, as specified in [MS-SEARCH] section 2.2.12.3.1.2 and section 2.2.13.3.1.2.

FarmId: MUST be a guid type, as specified in section 2.2.5.8. MUST have value of {BAA1B08F-CBCA-4AF8-95FE-67BA9526F9B6}.

Hint: Specifies whether the protocol server uses the metadata index or the full-text index catalog when processing a search query. MUST be a QueryHint type, as specified in section 2.2.5.4. If this element is not present or a value is not specified, a default value of "QueryHint.None" MUST be used.

HitHighlightedProperties: A list of properties that the protocol server includes in the HitHighlightedProperties for each result. MUST be an ArrayOfanyType type, as specified in section 2.2.4.2. This element MUST be present if the ResultType is not "ResultType.None".

For each result, the protocol server MUST include properties in this element only if PropertyInformation.M_TypeFullName is equal to System.String, as specified in section 3.1.4.3.3.2.

If QueryProperties is extended by the KeywordQueryProperties data type, for each result, the protocol server MUST include only properties in this element and the properties specified in the KeywordQueryProperties.selectProperties element.

If QueryProperties is extended by the FullTextSqlQueryProperties data type, for each search result, the protocol server MUST include only the properties specified in the SELECT statement of the SharePoint Search SQL syntax, as specified in [MS-SEARCH] section 2.2.12.3 and 2.2.13.3.

If the ResultsProvider element of QueryProperties is equal to SearchProvider.FASTSearch, the complex type MUST be ignored by the protocol server.

IgnoreAllNoiseQuery: Specifies how to respond to query text that contains only noise words. If this element is not present or a value is not specified, a default value of "true" MUST be used.

If QueryProperties is extended by the KeywordQueryProperties data type, this element MUST be ignored.

If QueryProperties is extended by the FullTextSqlQueryProperties data type, a value of "true" indicates that the search query where all the full-text predicates that contain only noise words MUST fail and the protocol server MUST return a FaultException<ExceptionDetail> message, and assume "true" for all the crawled items. A value of "false" indicates that the full text predicates containing only noise words will be returned.

If the ResultsProvider element of QueryProperties is equal to SearchProvider.FASTSearch, the complex type MUST be ignored by the protocol server.

KeywordInclusion: Specifies whether all the tokens in the search query are required. MUST be a KeywordInclusion type, as specified in section 2.2.5.2. If this element is not present or a value is not specified, a default value of "KeywordInclusion.AllKeywords" MUST be used.

If QueryProperties is extended by the KeywordQueryProperties complex type, this element applies to the whole query text.

If QueryProperties is extended by the FullTextSqlQueryProperties complex type, this element applies to the text specified in the FREETEXT statement of the SharePoint Search SQL syntax, as specified in [MS-SEARCH] section 2.2.12.3.1.2 and section 2.2.13.3.1.2.

Locale: The language of the query text as a language code identifier (LCID). The protocol server SHOULD use this information to influence its interpretation of the query text. If this element is not present or a value is not specified, the server MUST return a FaultException<ExceptionDetail> message.

MergeWithDefaultPartition: Specifies whether the protocol server also queries the default index partition, which is a special index partition with ID equal to"0C37852B-34D0-418e-91C6-2AC25AF4BE5B". If the element is "true", the protocol server MUST query the default index partition and merge with the result. If the element is "false", the protocol server MUST NOT query the default index partition.

OLSQuerySession: This parameter MUST be set to NULL by the protocol client if set. This parameter is ignored by the protocol server.

PagingCookie: Specifies the client-side state cookie. If this element is not present or a value is not specified, a default value of NULL MUST be used. The protocol server SHOULD use this element to round-trip the internal state required for paging of query results. The contents and use of this element are specific to the implementation of the protocol server. If this element is present and is non-empty, the protocol client MUST transfer the contents of this element as-is to the PagingCookie element that is sent on subsequent calls to the protocol server for additional query results for the same search query.

If the ResultsProvider element of QueryProperties is equal to SearchProvider.FASTSearch, the complex type MUST be ignored by the protocol server.

PartitionId: The GUID of the index partition that is used for this search query. If this element is not present or a value is not specified, a default value of an empty GUID MUST be used.

If the ResultsProvider element of QueryProperties is equal to SearchProvider.FASTSearch, the complex type MUST be ignored by the protocol server.

PersonalizationData: A unique identifier for the current user on whose behalf the search query is executed. MUST be a QueryPersonalizationData type, as specified in section 2.2.4.10. The use of this identifier is specific to the implementation of the protocol server.

If the ResultsProvider element of QueryProperties is equal to SearchProvider.FASTSearch, the complex type MUST be ignored by the protocol server.

QueryText: The query text of the search query. If this element is not present or a value is not specified, a default value of an empty string MUST be used, and the server MUST return a FaultException<ExceptionDetail> message.

If QueryProperties is extended by the KeywordQueryProperties complex type, the number of characters in QueryText MUST be less than or equal to 2048, and the value of QueryText MUST conform to the SharePoint Search Keyword Syntax, as specified in [MS-SEARCH] section 2.2.12.3 and 2.2.13.3.

If QueryProperties is extended by the FullTextSqlQueryProperties complex type, the number of characters in QueryText MUST be less than or equal to 4096, and the value of QueryText MUST confirm to the SharePoint Search SQL Syntax, as specified in the SELECT Statement in [MS-SEARCH] section 2.2.12.3 and 2.2.13.3.

RankingModelId: The GUID of the ranking model that SHOULD be used for this search query. If this element is not present or a value is not specified, the protocol server MUST use the default ranking model, according to protocol server configuration.

If the ResultsProvider element of QueryProperties is equal to SearchProvider.FASTSearch, the complex type MUST be ignored by the protocol server.

ResultTypes: The type of search results that are returned for the search query. MUST be a ResultType data type, as specified in section 2.2.5.5. If this element is not present or a value is not specified, a default value of "ResultType.None" MUST be used.

ResultsProvider: The result provider that is used for this search query. MUST be a SearchProvider type, as specified in section 2.2.5.6. The valid values for this element depend on the query role of the protocol server, as specified in the following table.

Query role for the protocol

Result provider computation

SharePoint Server search query role

The value of the ResultsProvider element that is set by the protocol client MUST be ignored and the protocol server MUST use "SearchProvider.SharepointSearch" as the value for ResultsProvider.

 FAST search query role

The protocol server MUST maintain a user-configurable default value for the result provider, as specified in SearchServiceApplication.DefaultSearchProvider in section 3.1.1.2. This value MUST be either "SearchProvider.FASTSearch" or "SearchProvider.SharepointSearch". If the ResultsProvider element is specified, the protocol server MUST use the value specified in the ResultsProvider element. If the value is "SearchProvider.Default", or if the ResultsProvider element is not specified, the protocol server MUST use the configured default value as the value for ResultsProvider.

RowLimit: The number of search results the protocol client wants to receive, starting at the index specified in the StartRow element. The RowLimit value MUST be greater than or equal to zero.

The protocol server returns search results from the sorted list of all search results, and the count of the returned search results MUST be no more than the value of RowLimit.

If QueryProperties is extended by the KeywordQueryProperties data type, the sort order for the list of search results is specified by the KeywordQueryProperties.SortList element.

If QueryProperties is extended by the FullTextSqlQueryProperties data type, the sort order for the list of search results is specified in the ORDER BY clause on the SELECT Statement of the SharePoint Search SQL syntax, as specified in [MS-SEARCH] section 2.2.12.3 and 2.2.13.3.

If the total number of search results returned for a search query is greater than or equal to the value of the StartRow element, but less than the value of the StartRow element and the RowLimit element combined, the protocol server MUST return as many search results as available.

If this element is not present or a value is not specified, a default value of "50" MUST be used.

RowsPerPage: The number of result items the protocol client displays per page. If this element is set to an integer value less than 1, the value of the RowLimit element MUST be used as the default value.

Sid: The security identifier (SID) of the user for whom the protocol client is requesting search results. If this element is non-empty, the protocol server MUST use this value for security trimming.

SiteId: The site collection identifier of the site collection that is used by the protocol server to identify the context of the search query. MUST be a guid type, as specified in section 2.2.5.8. If this element is not present or a value is not specified, a default value of the  empty GUID MUST be used.

StartRow: A zero-based index of the first search result in the list of all search results the protocol server returns. The StartRow value MUST be greater than or equal to zero.

If this element is not present or a value is not specified, a default value of zero ("0") MUST be used.

SummaryLength: The maximum number of characters in the result summary. The protocol server MUST return a HitHighlightedSummary property that contains less than or equal to SummaryLength number of characters. The SummaryLength value MUST be greater than or equal to zero and less than or equal to 10000.

TimeZoneID: The local time zone identifier that represents the local time zone of the website that processes the search query. The protocol server MUST return the local time identifier according to the specified time zone.

Timeout: The maximum time in milliseconds that the protocol server spends in executing a search query. If this element is not present or a value is not specified, a default value of "10000" MUST be used.

TotalRowsExactMinimum: The total number of search results, starting at the index specified in the StartRow element, until the protocol server returns the exact count in ResultTable.TotalRows, as specified in section 3.1.4.1.3.6. If this element is not present or a value is not specified, a default value of "200" MUST be used.

This property is used by a Search Paging control to accurately show the number of pages of results that are available for this search query.

If the ResultsProvider element of QueryProperties is equal to SearchProvider.FASTSearch, the complex type MUST be ignored by the protocol server.

TrimDuplicates: Specifies whether duplicates are removed by the protocol server before sorting, selecting, and sending the search results. A value of "true" indicates that the protocol server SHOULD perform duplicate result removal. A value of "false" indicates that the protocol server MUST NOT attempt to perform duplicate result removal. If this element is not present or a value is not specified, a default value of "true" MUST be used. The algorithm used for duplicate detection is specific to the implementation of the protocol server.

UrlZone: The zone that is used for alternate access mapping, MUST be a SPUrlZone type as specified in section 2.2.5.7. If this element is not present or a value is not specified, the protocol server MUST use SPUrlZone.Default as the default.

If the ResultsProvider element of QueryProperties is equal to SearchProvider.FASTSearch, the complex type MUST be ignored by the protocol server.

UseOLSQuery: This parameter MUST be set to zero ("0") by the protocol client if set. This parameter is ignored by the protocol server.

WcfTimeout: Maximum time in milliseconds that the protocol server spends in communicating over a communication channel. If a value 0 is specified the protocol server MUST NOT timeout. If this element is not present or a value is not specified, a default value of "120000" MUST be used.

WebId: The site identifier of the site that is used by the protocol server to identify the context of the search query. MUST be a guid type, as specified in section 2.2.5.8. If this element is not present or a value is not specified, a default value of "Guid.Empty", which is an instance of the guid type with a value of all zeros, MUST be used.

Properties: Specifies a property bag of key value pairs. This element MUST be of ArrayOfKeyValueOfstringanyType data type as specified in section 2.2.4.18, and SHOULD contain the following properties:

  • MaxSnippetLength: Specifies the maximum length of the HitHighlightedSummary generated for search result.

  • DesiredSnippetLength: Specifies the preferred length of the hit highlighted summary generated for search result.

  • Id: Specifies the identifier for the query. MUST NOT be NULL.

  • SourceId: Specifies the unique identifier for result source to use for executing the search query. If no value is specified then the protocol server MUST use the id for the default result source.

  • ShowPeopleNameSuggestions: Specifies if people names are included in query suggestions.

  • ResultsUrl: Specifies the URL for the page where the search results are going to be displayed.

  • QueryTag: Specifies the custom tags to be used to identify the query. Multiple tags MUST be separated with a semicolon.

  • EnableInterleaving: Specifies if the result sets which are generated by executing query rule actions to add result block are mixed with the result set for the original query. If true, ResultTableCollection (as specified in section 3.1.4.1.3.1) produced as a result of executing the search query MUST contain a ResultTable (as specified in section 3.1.4.1.3.6) with TableType value "InterleavingInformation", which has the information about how to interleave the result sets for display.

  • Priority: Reserved. MUST be ignored by protocol server.

  • IntentQueryId: Reserved. MUST be ignored by protocol server.

  • BypassResultTypes: Specifies if the search result item type SHOULD be returned for the query results. If "true", the search result item type will not be returned.

  • ProcessBestBets: Specifies if the search promoted results SHOULD be returned, if available, as a result set. If "true", the search promoted results will be returned, if available, as a result set.

  • ClientType: Specifies information about the protocol client.

  • GenerateBlockRankLog: If TRUE, the protocol server SHOULD return block rank log. Otherwise, the protocol server MUST NOT return the block rank log information. A block rank log SHOULD contain the textual information about the block score and the documents that were de-duplicated. The exact format of the block rank log is an implementation detail of the server and MUST NOT be interpreted by the protocol client.

  • BlockDedupeMode: Specifies whether a duplicate result SHOULD be removed from the result table collection or not. MUST be one of the following values:

    Value

    Meaning

    0

    No deduping.

    1

    Only remove from substrate if the result is already included in a higher ranking block.

    2

    Remove duplicates from substrate and blocks if already seen in a higher ranking block.

    3

    Remove entire block if any block document is already seen in a higher ranking block or substrate (default).

  • If BlockDedupeMode is not set, the server MUST behave as if 3 were specified.

  • EnableOrderingHitHighlightedProperty: Specifies whether values of multi-value properties are ordered by the number of words that match the query. If TRUE, values for each property are sorted in descending order by the number of hits. If FALSE, values will be returned in the original order.

  • HitHighlightedMultivaluePropertyLimit: Specifies the maximum number of hit highlighted values of multi-value properties to be returned.

  • ProcessPersonalFavorites: MUST be TRUE if personal favorites are requested to be returned with search results and FALSE otherwise.

  • UILanguage: Specifies the LCID for UI culture.

  • QueryTemplate: This is the text that will replace the query text. It can contain query variables which a query transform will replace during execution of the query.

PropertiesContractVersion: Specifies the version of QueryProperties complex type being used by the protocol client. SHOULD be set to 14.0.0.0<9>, 14.5.0.0<10> or 15.0.0.0<11>. If no value is specified then the protocol server MUST set the value to 14.0.0.0. If any other value is specified then the protocol server MUST respond as if 15.0.0.0 was set as the version.

RemainingDeserializationSkips: Specifies the recommended serialization steps to skip. The protocol server MAY use this recommendation to determine when to de-serialize the value in SerializedPropertyBag to key value pairs stored in Properties.

SerializedPropertyBag: Specifies a serialized representation of key value pairs in Properties, serialized using the DataContractSerializer. The protocol server MAY use this value for any subsequent communication over network to optimize the serialization time for properties.

DirectImsEndpointUri: An endpoint URI that serves search.<12> The protocol server will provide the endpoint URI if this value is null.