Skip to content

Azure Search IndexingParametersConfiguration needs parameters to be optional to create Indexer with Advanced Properties #33382

Open
@esgraham

Description

@esgraham
  • Package Name: azure_search_documents
  • Package Version: 11.4.0 (Latest)
  • Operating System: Windows
  • Python Version:

Describe the bug
Azure Search IndexingParametersConfiguration needs to be changed to optional parameters.

When using azure-search-documents to create an Indexer, advanced properties could not be set for an indexer with a data connection of Azure Blob or Azure SQL Server.

This has blocked multiple teams when using JSON files in that the JSON values in the file cannot be used with Output Field Mappings. Instead, the values are added to storage blobs as metadata fields, but that could be a security risk and the metadata fields are not available to all Azure Resources when creating blobs (ie, ADF and Logic Apps).

To Reproduce
Steps to reproduce the behavior:
The following code returned the error: Configuration property 'queryTimeout' is not supported for the data source of type 'azureblob'.

      parameters_config = IndexingParametersConfiguration(parsing_mode="json")
      index_parameters = IndexingParameters(configuration=parameters_config)
      
      indexer = SearchIndexer( 
          name=indexer_name,  
          skillset_name=skillset_name,  
          target_index_name= index_name,  
          data_source_name= blob_data_source.name,
          parameters=index_parameters)

Conversely, the following code returned the error: Configuration property 'parsingMode' is not supported for the data source of type 'azuresql'

  parameters_config = IndexingParametersConfiguration(query_timeout="00:06:00")
  index_parameters = IndexingParameters(configuration=parameters_config)
  
  indexer = SearchIndexer(  
      name=indexer_name,  
      skillset_name=skillset_name,  
      target_index_name= index_name,  
      data_source_name= sql_data_source.name,
      parameters=index_parameters)

Expected behavior
To be able to create Azure Search Indexers with Advanced Properties

Additional context
I created pull request with the changes required and live tests, however, the are auto-generated the changes will not be saved. To see the changes requried view PR #33357

Metadata

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.SearchquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions