Skip to content

[Search] Refresh azure-search-documents samples for 2026-04-01 GA#46677

Merged
hizixin merged 1 commit intomainfrom
search/2026-04-01-ga-samples
May 1, 2026
Merged

[Search] Refresh azure-search-documents samples for 2026-04-01 GA#46677
hizixin merged 1 commit intomainfrom
search/2026-04-01-ga-samples

Conversation

@hizixin
Copy link
Copy Markdown
Member

@hizixin hizixin commented May 1, 2026

  • 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.

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:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Copilot AI review requested due to automatic review settings May 1, 2026 21:56
@hizixin hizixin requested review from a team as code owners May 1, 2026 21:56
@github-actions github-actions Bot added the Search label May 1, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread sdk/search/azure-search-documents/samples/sample_query_vector_async.py Outdated
Comment thread sdk/search/azure-search-documents/samples/sample_query_vector.py Outdated
Comment thread sdk/search/azure-search-documents/samples/sample_query_vector_async.py Outdated
Comment thread sdk/search/azure-search-documents/samples/sample_query_vector.py Outdated
- 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>
@hizixin hizixin force-pushed the search/2026-04-01-ga-samples branch from 3af3591 to 6a37dfc Compare May 1, 2026 22:17
@github-project-automation github-project-automation Bot moved this from Untriaged to In Progress in Azure SDK for Search May 1, 2026
@hizixin hizixin merged commit 81a96af into main May 1, 2026
19 checks passed
@hizixin hizixin deleted the search/2026-04-01-ga-samples branch May 1, 2026 23:18
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Azure SDK for Search May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants