class RelevantResults
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
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/search/relevant_results.py
6 - 62
moderate
Purpose
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
Source Code
class RelevantResults(ClientValue):
"""
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
"""
def __init__(
self,
group_template_id=None,
item_template_id=None,
properties=None,
result_title=None,
result_title_url=None,
table=SimpleDataTable(),
row_count=None,
total_rows=None,
total_rows_including_duplicates=None,
):
"""
:param str item_template_id: Specifies the identifier of the layout template that specifies how the result
item will be displayed.
:param str group_template_id: Specifies the identifier of the layout template that specifies how the results
returned will be arranged.
:param dict properties: Specifies a property bag of key value pairs
:param str result_title: Specifies the title associated with results for the transformed query by query rule
action. MUST NOT be more than 64 characters in length.
:param str result_title_url: Specifies the URL to be linked to the ResultTitle. MUST NOT be more than 2048
characters in length
:param SimpleDataTable table: This contains a table of query results
:param int row_count: The number of query results contained in the Table element.
:param int total_rows: This element MUST contain the total number of results that match the conditions given
in the search query and are of the type specified in the ResultType element.
:param int total_rows_including_duplicates: This element SHOULD contain the total number of results,
including duplicates, that match the conditions given in the search query and are of the type specified
in the ResultType element
"""
super(RelevantResults, self).__init__()
self.GroupTemplateId = group_template_id
self.ItemTemplateId = item_template_id
self.Properties = properties
self.ResultTitle = result_title
self.ResultTitleUrl = result_title_url
self.RowCount = row_count
self.Table = table
self.TotalRows = total_rows
self.TotalRowsIncludingDuplicates = total_rows_including_duplicates
def set_property(self, k, v, persist_changes=True):
if k == "Properties":
v = ODataType.parse_key_value_collection(v)
super(RelevantResults, self).set_property(k, v, persist_changes)
return self
@property
def entity_type_name(self):
return "Microsoft.Office.Server.Search.REST.RelevantResults"
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
ClientValue | - |
Parameter Details
bases: Parameter of type ClientValue
Return Value
Returns unspecified type
Class Interface
Methods
__init__(self, group_template_id, item_template_id, properties, result_title, result_title_url, table, row_count, total_rows, total_rows_including_duplicates)
Purpose: :param str item_template_id: Specifies the identifier of the layout template that specifies how the result item will be displayed. :param str group_template_id: Specifies the identifier of the layout template that specifies how the results returned will be arranged. :param dict properties: Specifies a property bag of key value pairs :param str result_title: Specifies the title associated with results for the transformed query by query rule action. MUST NOT be more than 64 characters in length. :param str result_title_url: Specifies the URL to be linked to the ResultTitle. MUST NOT be more than 2048 characters in length :param SimpleDataTable table: This contains a table of query results :param int row_count: The number of query results contained in the Table element. :param int total_rows: This element MUST contain the total number of results that match the conditions given in the search query and are of the type specified in the ResultType element. :param int total_rows_including_duplicates: This element SHOULD contain the total number of results, including duplicates, that match the conditions given in the search query and are of the type specified in the ResultType element
Parameters:
group_template_id: Parameteritem_template_id: Parameterproperties: Parameterresult_title: Parameterresult_title_url: Parametertable: Parameterrow_count: Parametertotal_rows: Parametertotal_rows_including_duplicates: Parameter
Returns: See docstring for return details
set_property(self, k, v, persist_changes)
Purpose: Sets property
Parameters:
k: Parameterv: Parameterpersist_changes: 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.odata.type import ODataType
from office365.sharepoint.search.simple_data_table import SimpleDataTable
Usage Example
# Example usage:
# result = RelevantResults(bases)
Tags
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class QueryResult 60.4% similar
-
class SearchResult 56.7% similar
-
class RefinementResults 51.4% similar
-
class SpecialTermResults 46.1% similar
-
class CustomResult 45.8% similar