Fix: Use searchable field instead of identifier in Azure Search#112
Open
akashSharmaDev wants to merge 1 commit intoAzure-Samples:mainfrom
Open
Fix: Use searchable field instead of identifier in Azure Search#112akashSharmaDev wants to merge 1 commit intoAzure-Samples:mainfrom
akashSharmaDev wants to merge 1 commit intoAzure-Samples:mainfrom
Conversation
…rch field, But identifiers are mainly id which are not searchable
Collaborator
|
@akashSharmaDev Hm, the identifier_field is searchable in the index that's set up by the integrated vectorization script: Are you using this with a different index? |
pamelafox
reviewed
Aug 18, 2025
| # are generated, where chunk_id is searchable with a keyword tokenizer, not filterable | ||
| search_results = await search_client.search(search_text=list, | ||
| search_fields=[identifier_field], | ||
| search_fields=[content_field], |
Collaborator
There was a problem hiding this comment.
This seems like a functional difference, to search the content field for the grounding sources, how does this work? It's sending in a query like "4c1968ac98f3_aHR0cHM6Ly9zdGVqN2o0ZzJ6cG96ZXMuYmxvYi5jb3JlLndpbmRvd3MubmV0L2NvbnRlbnQvcm9sZV9saWJyYXJ5LnBkZg2_pages_36" which wouldnt be in the content field.
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.

Resolved an issue where Azure Search was using the identifier field (typically id) as the search field. Since identifier fields are not marked as searchable in the index, this caused search requests to fail. The implementation now ensures that only valid searchable fields are used for query execution, preventing HttpResponseError related to non-searchable fields.