Repository navigation
Python: fix(azure_ai_search): use storage_name aliases in hybrid_search - #14689
Open
MOHAMMED WASIM KHAN (wasim-builds) wants to merge 1 commit into
Open
MOHAMMED WASIM KHAN (wasim-builds) wants to merge 1 commit into
MOHAMMED WASIM KHAN (wasim-builds) wants to merge 1 commit into
Conversation
MOHAMMED WASIM KHAN (wasim-builds)
deployed
to
github-app-auth
October 30, 2026 05:16 — with
GitHub Actions
Active
MOHAMMED WASIM KHAN (wasim-builds)
requested a review
from a team
as a code owner
October 30, 2026 05:16
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Closes #14684
When data and vector fields define
storage_namealiases (e.g.content->body,embedding->vec), Azure AI Search indexes are created using the storage names. However,AzureAISearchCollection.hybrid_search()was usingfield.name/vector_field.nameinstead ofstorage_name or namewhen configuringsearch_fieldsandvector_queries[0].fields. As a result, Azure AI Search rejected the hybrid search request with a 400 unknown field error because the emitted request referenced model property names not present in the index.In contrast,
SearchType.VECTORcorrectly usesvector_field.storage_name or vector_field.name.Description
AzureAISearchCollection._inner_searchforSearchType.KEYWORD_HYBRID:options.additional_property_nameis specified, resolve it to the field'sstorage_name or nameif it matches a model field name or storage name alias.options.additional_property_nameis omitted, collectfield.storage_name or field.namefor all full-text indexed data fields.VectorizedQueryandVectorizableTextQuery, configurefields=vector_field.storage_name or vector_field.name if vector_field else None, matching the vector search branch.test_azure_ai_search.pyasserting that hybrid search and vector search correctly use storage name aliases for search fields and vector query fields.Contribution Checklist