[Search] Refresh azure-search-documents samples for 2026-04-01 GA#46677
Merged
[Search] Refresh azure-search-documents samples for 2026-04-01 GA#46677
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refreshes azure-search-documents Python samples for the 2026-04-01 GA surface area, expanding agentic retrieval coverage with dedicated Knowledge Source/Knowledge Base CRUD samples and improving consistency/reliability across sample resources.
Changes:
- Added new CRUD reference samples for Knowledge Sources and Knowledge Bases (sync + async).
- Refocused the agentic retrieval samples on an end-to-end flow (setup → retrieve → cleanup) and cross-referenced the CRUD samples for full lifecycle details.
- Updated vector query samples to reduce post-upload race conditions by polling document count before issuing the first query; standardized several resource names to the
hotels-sample-*convention.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/search/azure-search-documents/samples/sample_query_vector_async.py | Updates vector profile/HNSW naming and adds post-upload polling to mitigate first-query race. |
| sdk/search/azure-search-documents/samples/sample_query_vector.py | Same as async variant: naming updates + polling to mitigate first-query race. |
| sdk/search/azure-search-documents/samples/sample_knowledge_source_crud_async.py | New async CRUD sample for knowledge sources. |
| sdk/search/azure-search-documents/samples/sample_knowledge_source_crud.py | New sync CRUD sample for knowledge sources. |
| sdk/search/azure-search-documents/samples/sample_knowledge_base_crud_async.py | New async CRUD sample for knowledge bases. |
| sdk/search/azure-search-documents/samples/sample_knowledge_base_crud.py | New sync CRUD sample for knowledge bases. |
| sdk/search/azure-search-documents/samples/sample_indexer_datasource_crud_async.py | Aligns variable/resource naming with the hotels-sample-* convention. |
| sdk/search/azure-search-documents/samples/sample_indexer_datasource_crud.py | Aligns variable/resource naming with the hotels-sample-* convention. |
| sdk/search/azure-search-documents/samples/sample_index_alias_crud_async.py | Renames alias to hotels-sample-* naming convention. |
| sdk/search/azure-search-documents/samples/sample_index_alias_crud.py | Renames alias to hotels-sample-* naming convention. |
| sdk/search/azure-search-documents/samples/sample_agentic_retrieval_async.py | Refactors into end-to-end flow and updates retrieval client usage patterns. |
| sdk/search/azure-search-documents/samples/sample_agentic_retrieval.py | Refactors into end-to-end flow and updates retrieval client usage patterns. |
- Add sample_knowledge_source_crud(.py/_async.py) and sample_knowledge_base_crud(.py/_async.py) as CRUD reference samples. - Refocus sample_agentic_retrieval(.py/_async.py) on the end-to-end retrieval flow (setup KS+KB, retrieve, cleanup) and cross-reference the CRUD samples for full lifecycle coverage. - Unify sample resource naming on the hotels-sample-* convention across alias, vector profile/HNSW configs, KS, KB, semantic config, and indexer data source samples. - Fix sample_query_vector(.py/_async.py) post-upload race by polling get_document_count before issuing the first query. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
3af3591 to
6a37dfc
Compare
efrainretana
approved these changes
May 1, 2026
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.
Description
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines