🔍 Code Extractor

class QueryResult

Maturity: 35

The QueryResult type is a grouping of result tables, where each contained result table is a ResultTable as specified in [MS-QSSWS] section 3.1.4.1.3.6.

File:
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/search/query_result.py
Lines:
9 - 43
Complexity:
moderate

Purpose

The QueryResult type is a grouping of result tables, where each contained result table is a ResultTable as specified in [MS-QSSWS] section 3.1.4.1.3.6.

Source Code

class QueryResult(ClientValue):
    """
    The QueryResult type is a grouping of result tables, where each contained result table is a ResultTable
    as specified in [MS-QSSWS] section 3.1.4.1.3.6.
    """

    def __init__(
        self,
        query_id=None,
        custom_results=None,
        refinement_results=RefinementResults(),
        relevant_results=RelevantResults(),
        query_rule_id=None,
        special_term_results=SpecialTermResults(),
    ):
        """
        :param str query_id: Specifies the identifier for the search query
        :param list[CustomResults] custom_results: CustomResults is a list that contains zero or more CustomResult
            instances. A CustomResult instance is a ResultTable with ResultType of any kind (except RefinementResults,
            RelevantResults, and SpecialTermResults)
        :param RelevantResults relevant_results: This contains a list of query results, all of which are of the
            type specified in TableType.
        :param str query_rule_id: Specifies the unique identifier of the query rule that produced the result set.
            MUST be {00000000-0000-0000-0000-000000000000} if the result set is not associated to a query rule.
        """
        self.QueryId = query_id
        self.QueryRuleId = query_rule_id
        self.RefinementResults = refinement_results
        self.CustomResults = ClientValueCollection(CustomResult, custom_results)
        self.RelevantResults = relevant_results
        self.SpecialTermResults = special_term_results

    @property
    def entity_type_name(self):
        return "Microsoft.Office.Server.Search.REST.QueryResult"

Parameters

Name Type Default Kind
bases ClientValue -

Parameter Details

bases: Parameter of type ClientValue

Return Value

Returns unspecified type

Class Interface

Methods

__init__(self, query_id, custom_results, refinement_results, relevant_results, query_rule_id, special_term_results)

Purpose: :param str query_id: Specifies the identifier for the search query :param list[CustomResults] custom_results: CustomResults is a list that contains zero or more CustomResult instances. A CustomResult instance is a ResultTable with ResultType of any kind (except RefinementResults, RelevantResults, and SpecialTermResults) :param RelevantResults relevant_results: This contains a list of query results, all of which are of the type specified in TableType. :param str query_rule_id: Specifies the unique identifier of the query rule that produced the result set. MUST be {00000000-0000-0000-0000-000000000000} if the result set is not associated to a query rule.

Parameters:

  • query_id: Parameter
  • custom_results: Parameter
  • refinement_results: Parameter
  • relevant_results: Parameter
  • query_rule_id: Parameter
  • special_term_results: Parameter

Returns: None

entity_type_name(self) property

Purpose: Performs entity type name

Returns: None

Required Imports

from office365.runtime.client_value import ClientValue
from office365.runtime.client_value_collection import ClientValueCollection
from office365.sharepoint.search.custom_result import CustomResult
from office365.sharepoint.search.refinement_results import RefinementResults
from office365.sharepoint.search.relevant_results import RelevantResults

Usage Example

# Example usage:
# result = QueryResult(bases)

Similar Components

AI-powered semantic similarity - components with related functionality:

  • class SearchResult 69.4% similar

    The SearchResult structure resembles the ResultTableCollection structure (specified in [MS-QSSWS] section 3.1.4.1.3.1). However, the individual result tables that share the same QueryId are grouped together in a QueryResult structure (specified in section 3.1.5.2). The search result tables that have exactly the same QueryId value as specified by the protocol client are grouped in the same QueryResult structure accessed through the PrimaryQueryResult property. All other QueryResult buckets are organized in a CSOM array of QueryResults accessed through the SecondaryQueryResults property.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/search/result.py
  • class RelevantResults 60.4% similar

    The RelevantResults table contains the actual query results. It MUST only be present if the ResultTypes element in the properties element of the Execute message contains ResultType.RelevantResults, as specified in section 2.2.5.5

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/search/relevant_results.py
  • class CustomResult 56.9% similar

    A data class representing custom search query results with layout templates and properties for Microsoft Office Server Search REST API.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/search/custom_result.py
  • class ClientResult 53.7% similar

    Client result

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/runtime/client_result.py
  • class QuerySuggestionResults 53.6% similar

    A container class for SharePoint search query suggestions, including people names, personal results, popular results, and query suggestions.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/search/query/suggestion_results.py
← Back to Browse