class QuerySuggestionQuery
A client value class representing a query suggestion query for SharePoint search operations.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/search/query/suggestion_results.py
9 - 12
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
-
class QuerySuggestionResults 82.1% similar
-
class PersonalResultSuggestion 75.4% similar
-
class SearchQuery 73.0% similar
-
class QueryAutoCompletionResults 72.6% similar