-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Open
Labels
ClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.Searchcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Description
- Package Name: azure-search-documents
- Package Version: 11.6.0
- Operating System: Windows Server 2025
- Python Version: 3.12.10
Describe the bug
SearchIndexer.from_dict() failed with error:
azure.core.exceptions.DeserializationError: Unable to deserialize {} into model <class 'azure.search.documents.indexes.models._models.SearchIndexer'>. SearchIndexer.__init__() missing 3 required keyword-only arguments: 'name', 'data_source_name', and 'target_index_name'
To Reproduce
Steps to reproduce the behavior:
- create a json definition of the indexer
- load the json
- call SearchIndexer.from_dict()
import json
from azure.search.documents.indexes.models import SearchIndexer
# Define path to index definition
indexer_json_path = "indexer.json"
# Load JSON definition
with open(indexer_json_path, "r", encoding="utf-8") as f:
indexer_json = json.load(f)
# Convert JSON to SearchIndexer object
indexer = SearchIndexer.from_dict(indexer_json)
Expected behavior
The SearchIndexer object should be create without error.
Additional context
Workaround is to call the internal function as follow:
indexer = SearchIndexer._from_generated(_SearchIndexer.from_dict(indexer_json))
Metadata
Metadata
Assignees
Labels
ClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.Searchcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that