🔍 Code Extractor

class QuerySuggestionQuery

Maturity: 22

A client value class representing a query suggestion query for SharePoint search operations.

File:
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/search/query/suggestion_results.py
Lines:
9 - 12
Complexity:
simple

Purpose

QuerySuggestionQuery is a specialized client value class used in SharePoint search operations to represent and handle query suggestion requests. It inherits from ClientValue and provides the entity type name required for SharePoint's client-side object model (CSOM) communication. This class is used when working with SharePoint's search query suggestion functionality to get autocomplete or suggested queries based on user input.

Source Code

class QuerySuggestionQuery(ClientValue):
    @property
    def entity_type_name(self):
        return "Microsoft.SharePoint.Client.Search.Query.QuerySuggestionQuery"

Parameters

Name Type Default Kind
bases ClientValue -

Parameter Details

__init__: Inherits constructor from ClientValue base class. No explicit constructor parameters are defined in this class. The base ClientValue class handles initialization of client-side values for SharePoint operations.

Return Value

Instantiation returns a QuerySuggestionQuery object that can be used in SharePoint search query suggestion operations. The entity_type_name property returns a string 'Microsoft.SharePoint.Client.Search.Query.QuerySuggestionQuery' which identifies this object type in SharePoint's CSOM.

Class Interface

Methods

@property def entity_type_name(self) -> str property

Purpose: Returns the fully qualified entity type name used by SharePoint's client-side object model to identify this query suggestion query type

Returns: A string containing 'Microsoft.SharePoint.Client.Search.Query.QuerySuggestionQuery' which is the CSOM type identifier

Dependencies

  • office365

Required Imports

from office365.runtime.client_value import ClientValue
from office365.sharepoint.search.query.query_suggestion_query import QuerySuggestionQuery

Usage Example

from office365.runtime.client_value import ClientValue
from office365.sharepoint.search.query.query_suggestion_query import QuerySuggestionQuery

# Instantiate a query suggestion query object
query_suggestion = QuerySuggestionQuery()

# Access the entity type name (typically used internally by the framework)
entity_type = query_suggestion.entity_type_name
print(entity_type)  # Output: Microsoft.SharePoint.Client.Search.Query.QuerySuggestionQuery

# This object would typically be used as part of a larger SharePoint search operation
# in conjunction with a ClientContext and search service

Best Practices

  • This class is typically instantiated as part of SharePoint search operations and not used in isolation
  • The entity_type_name property is primarily used internally by the Office365 SDK for proper serialization and communication with SharePoint services
  • Ensure proper authentication and context setup before using this class in search operations
  • This class follows the ClientValue pattern used throughout the Office365 Python SDK for representing SharePoint client-side objects
  • Do not modify the entity_type_name property as it must match the exact SharePoint CSOM type name

Similar Components

AI-powered semantic similarity - components with related functionality:

  • class TenantCustomQuerySuggestions 83.3% similar

    A client value class representing tenant-level custom query suggestions for SharePoint Search, inheriting from ClientValue base class.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/search/query/tenant_custom_query_suggestions.py
  • class QuerySuggestionResults 82.1% 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
  • class PersonalResultSuggestion 75.4% similar

    A data class representing a personal search result suggestion from SharePoint Search, containing metadata about suggested results including title, URL, and best bet status.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/search/query/personal_result_suggestion.py
  • class SearchQuery 73.0% similar

    Represents a search query object that encapsulates search terms and optional query templates for SharePoint/Office365 search operations.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/search/query.py
  • class QueryAutoCompletionResults 72.6% similar

    A class representing the results of a SharePoint query auto-completion operation, containing execution metrics, correlation information, and a collection of query suggestions.

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