class Refiner
A Refiner class that represents a SharePoint search refiner containing a list of RefinerEntry objects, inheriting from ClientValue for Office 365 REST API integration.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/search/refiner/refiner.py
4 - 9
simple
Purpose
This class serves as a data model for SharePoint search refiners in the Office 365 REST API. It represents a refiner object that contains entries for filtering and refining search results. The class is designed to work with Microsoft.Office.Server.Search.REST.Refiner entity type and provides the necessary structure for handling search refinement data in SharePoint Online operations.
Source Code
class Refiner(ClientValue):
"""A refiner contains a list with entries, of the RefinerEntry types"""
@property
def entity_type_name(self):
return "Microsoft.Office.Server.Search.REST.Refiner"
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
ClientValue | - |
Parameter Details
__init__: The constructor parameters are inherited from ClientValue base class. No explicit constructor is defined in this class, so it uses the parent class's initialization logic.
Return Value
Instantiation returns a Refiner object that can be used to represent and manipulate SharePoint search refiner data. The entity_type_name property returns the string 'Microsoft.Office.Server.Search.REST.Refiner' which identifies the entity type in the Office 365 REST API.
Class Interface
Methods
@property entity_type_name(self) -> str
property
Purpose: Returns the entity type name used by the Office 365 REST API to identify this refiner object
Returns: A string containing 'Microsoft.Office.Server.Search.REST.Refiner' which is the entity type identifier for SharePoint search refiners
Attributes
| Name | Type | Description | Scope |
|---|---|---|---|
entity_type_name |
str | Read-only property that returns the REST API entity type name for this refiner object | instance |
Dependencies
office365
Required Imports
from office365.runtime.client_value import ClientValue
Usage Example
from office365.runtime.client_value import ClientValue
from office365.sharepoint.search.refiner import Refiner
# Instantiate a Refiner object
refiner = Refiner()
# Access the entity type name
entity_type = refiner.entity_type_name
print(entity_type) # Output: Microsoft.Office.Server.Search.REST.Refiner
# Typically used in context of SharePoint search operations
# The refiner would be populated with RefinerEntry objects
# and used to filter search results
Best Practices
- This class is primarily a data container and should be instantiated when working with SharePoint search refiners
- The class inherits from ClientValue, which provides serialization/deserialization capabilities for Office 365 REST API communication
- Typically used in conjunction with RefinerEntry objects to build complete refiner structures
- The entity_type_name property should not be modified as it identifies the specific REST API entity type
- This class is part of a larger Office 365 SDK and should be used within the context of authenticated SharePoint operations
- No explicit state management is required as the class relies on its parent ClientValue for data handling
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class RefinerEntry 86.8% similar
-
class RefinementResults 77.9% similar
-
class ReorderingRule 62.2% similar
-
class SearchEndpoints 60.0% similar
-
class ReorderingRuleCollection 59.8% similar