Skip to content

azure-search-documents 12.0.0 GA release for API version 2026-04-01#45810

Draft
hizixin wants to merge 1 commit intomainfrom
search/2026-04-01-ga
Draft

azure-search-documents 12.0.0 GA release for API version 2026-04-01#45810
hizixin wants to merge 1 commit intomainfrom
search/2026-04-01-ga

Conversation

@hizixin
Copy link
Member

@hizixin hizixin commented Mar 19, 2026

Do Not Merge

This is a GA release branch. It will be published directly from the branch and should not be merged into main. Main tracks the preview release path.

Major version bump for GA release. Regenerated SDK from TypeSpec spec commit 8be754a4. Removed preview-only types not promoted to GA. Updated CHANGELOG to follow established GA convention.

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.

@hizixin hizixin requested review from a team as code owners March 19, 2026 21:24
Copilot AI review requested due to automatic review settings March 19, 2026 21:24
@hizixin hizixin marked this pull request as draft March 19, 2026 21:25
@hizixin hizixin force-pushed the search/2026-04-01-ga branch from ee9633c to b2ab9d7 Compare March 19, 2026 21:26
Copy link
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

Major-version GA release update for azure-search-documents, regenerating from the Search data-plane TypeSpec and aligning the Python surface area with the 2026-04-01 API (including removal of preview-only types/features not promoted to GA).

Changes:

  • Regenerated SDK and bumped package version to 12.0.0 with default API version 2026-04-01.
  • Removed preview-only models/enums/parameters (notably several search/debug/hybrid/vector threshold and SharePoint-related types) and updated tests accordingly.
  • Updated model serialization/deserialization helpers and streaming response handling (added decompress option gating iter_bytes() vs iter_raw()).

Reviewed changes

Copilot reviewed 43 out of 45 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
sdk/search/azure-search-documents/tsp-location.yaml Updates TypeSpec source commit used for generation.
sdk/search/azure-search-documents/tests/test_search_client.py Updates facet aggregation test expectations to match GA model shape.
sdk/search/azure-search-documents/tests/test_knowledge_source_remote_sharepoint_live.py Removes live tests for SharePoint knowledge source types that are no longer in GA.
sdk/search/azure-search-documents/tests/test_knowledge_base_live.py Removes service statistics runtime test tied to removed types.
sdk/search/azure-search-documents/tests/test_knowledge_base_configuration_live.py Updates knowledge base config tests to match removed reasoning effort shape.
sdk/search/azure-search-documents/tests/async_tests/test_knowledge_source_remote_sharepoint_live_async.py Removes async live tests for removed SharePoint knowledge source types.
sdk/search/azure-search-documents/tests/async_tests/test_knowledge_base_live_async.py Mirrors sync test removals for async knowledge base tests.
sdk/search/azure-search-documents/tests/async_tests/test_knowledge_base_configuration_live_async.py Mirrors sync reasoning-effort test updates for async.
sdk/search/azure-search-documents/azure/search/documents/models/_models.py Removes preview-only models/properties (debug info, hybrid search, facet metrics, vector thresholds, etc.).
sdk/search/azure-search-documents/azure/search/documents/models/_enums.py Removes preview-only enums (query language/speller/rewrites, vector threshold kinds, etc.).
sdk/search/azure-search-documents/azure/search/documents/models/init.py Updates public exports to match removed models/enums.
sdk/search/azure-search-documents/azure/search/documents/knowledgebases/models/_models.py Aligns knowledgebase models with GA API (removes SharePoint variants; adds sync error model; renames max output size field).
sdk/search/azure-search-documents/azure/search/documents/knowledgebases/models/_enums.py Removes preview-only enum values and entire output-mode enum.
sdk/search/azure-search-documents/azure/search/documents/knowledgebases/models/init.py Updates knowledgebases public exports (adds KnowledgeSourceSynchronizationError, removes SharePoint-related exports).
sdk/search/azure-search-documents/azure/search/documents/knowledgebases/aio/_operations/_operations.py Removes query-source auth kwarg; adds streaming raw/decompressed selection.
sdk/search/azure-search-documents/azure/search/documents/knowledgebases/aio/_configuration.py Updates endpoint docstring + default API version to 2026-04-01.
sdk/search/azure-search-documents/azure/search/documents/knowledgebases/aio/_client.py Updates endpoint docstring + API version docs to 2026-04-01.
sdk/search/azure-search-documents/azure/search/documents/knowledgebases/_utils/model_base.py Improves model equality and XML deserialization behavior.
sdk/search/azure-search-documents/azure/search/documents/knowledgebases/_operations/_operations.py Removes query-source auth header support; adds streaming raw/decompressed selection.
sdk/search/azure-search-documents/azure/search/documents/knowledgebases/_configuration.py Updates endpoint docstring + default API version to 2026-04-01.
sdk/search/azure-search-documents/azure/search/documents/knowledgebases/_client.py Updates endpoint docstring + API version docs to 2026-04-01.
sdk/search/azure-search-documents/azure/search/documents/indexes/models/_patch.py Removes preview-only IndexerPermissionOption plumbing from patched models.
sdk/search/azure-search-documents/azure/search/documents/indexes/models/_enums.py Adds/removes enum members per GA API (e.g., entity/sentiment languages; removes SharePoint-related enums).
sdk/search/azure-search-documents/azure/search/documents/indexes/models/init.py Updates public exports to align with removed/added models/enums.
sdk/search/azure-search-documents/azure/search/documents/indexes/aio/_configuration.py Updates endpoint docstring + default API version to 2026-04-01.
sdk/search/azure-search-documents/azure/search/documents/indexes/aio/_client.py Updates endpoint docstring + API version docs to 2026-04-01.
sdk/search/azure-search-documents/azure/search/documents/indexes/_utils/model_base.py Mirrors model equality and XML deserialization updates.
sdk/search/azure-search-documents/azure/search/documents/indexes/_configuration.py Updates endpoint docstring + default API version to 2026-04-01.
sdk/search/azure-search-documents/azure/search/documents/indexes/_client.py Updates endpoint docstring + API version docs to 2026-04-01.
sdk/search/azure-search-documents/azure/search/documents/aio/_operations/_patch.py Updates default API version and removes preview-only search kwargs passthroughs.
sdk/search/azure-search-documents/azure/search/documents/aio/_operations/_operations.py Adds streaming raw/decompressed selection; removes preview-only query params.
sdk/search/azure-search-documents/azure/search/documents/aio/_configuration.py Updates endpoint docstring + default API version to 2026-04-01.
sdk/search/azure-search-documents/azure/search/documents/aio/_client.py Updates endpoint docstring + API version docs to 2026-04-01.
sdk/search/azure-search-documents/azure/search/documents/_version.py Bumps package version to 12.0.0.
sdk/search/azure-search-documents/azure/search/documents/_utils/model_base.py Mirrors model equality and XML deserialization updates.
sdk/search/azure-search-documents/azure/search/documents/_operations/_patch.py Updates default API version and removes preview-only search kwargs passthroughs.
sdk/search/azure-search-documents/azure/search/documents/_operations/_operations.py Removes security header/query params from builders; adds streaming raw/decompressed selection.
sdk/search/azure-search-documents/azure/search/documents/_configuration.py Updates endpoint docstring + default API version to 2026-04-01.
sdk/search/azure-search-documents/azure/search/documents/_client.py Updates endpoint docstring + API version docs to 2026-04-01.
sdk/search/azure-search-documents/apiview-properties.json Updates APIView name mappings for removed/added public types.
sdk/search/azure-search-documents/_metadata.json Updates tracked service API version to 2026-04-01.
sdk/search/azure-search-documents/CHANGELOG.md Adds GA 12.0.0 entry and enumerates added/removed API surface.
Comments suppressed due to low confidence (5)

sdk/search/azure-search-documents/azure/search/documents/knowledgebases/_operations/_operations.py:210

  • decompress is popped from kwargs before calling pipeline.run, so the decode/decompression policy will never see a caller-provided decompress=False. This can lead to inconsistent behavior (e.g., response may still be decompressed while iter_raw() is returned). Prefer reading decompress with kwargs.get(...) (or passing it through) so the pipeline and the streaming iterator stay consistent.
        _decompress = kwargs.pop("decompress", True)
        _stream = kwargs.pop("stream", False)
        pipeline_response: PipelineResponse = self._client._pipeline.run(  # pylint: disable=protected-access
            _request, stream=_stream, **kwargs
        )

sdk/search/azure-search-documents/azure/search/documents/knowledgebases/aio/_operations/_operations.py:178

  • decompress is popped from kwargs before calling pipeline.run, so a caller-provided decompress=False won't reach the pipeline decode/decompression policy. This can make iter_raw()/iter_bytes() selection inconsistent with what actually happened in the pipeline. Prefer kwargs.get("decompress", True) (without popping) or otherwise ensure the flag is passed through to pipeline.run.
    sdk/search/azure-search-documents/azure/search/documents/aio/_operations/_operations.py:92
  • decompress is popped from kwargs before calling pipeline.run, which prevents a caller-provided decompress=False from reaching the pipeline decode/decompression policy. This can result in returning iter_raw() even though the response was already decompressed (or vice versa). Prefer reading decompress without removing it from kwargs, or pass it through explicitly to pipeline.run.
        _decompress = kwargs.pop("decompress", True)
        _stream = kwargs.pop("stream", False)
        pipeline_response: PipelineResponse = await self._client._pipeline.run(  # type: ignore # pylint: disable=protected-access
            _request, stream=_stream, **kwargs
        )

sdk/search/azure-search-documents/azure/search/documents/_operations/_operations.py:480

  • decompress is popped from kwargs before calling pipeline.run, so a caller-provided decompress=False will never reach the pipeline decode/decompression policy. That can make the returned streaming iterator (iter_bytes() vs iter_raw()) inconsistent with how the pipeline handled the response. Prefer kwargs.get("decompress", True) (no pop) and pass the flag through to pipeline.run.
        _decompress = kwargs.pop("decompress", True)
        _stream = kwargs.pop("stream", False)
        pipeline_response: PipelineResponse = self._client._pipeline.run(  # pylint: disable=protected-access
            _request, stream=_stream, **kwargs
        )

sdk/search/azure-search-documents/azure/search/documents/_operations/_operations.py:76

  • The generated search request builders no longer accept/serialize the document-security headers (x-ms-query-source-authorization, x-ms-enable-elevated-read). As a result, passing the existing x_ms_query_source_authorization / x_ms_enable_elevated_read kwargs (used in current tests and mentioned in earlier changelog entries) will have no effect on outgoing requests. If these headers are still supported in the GA API, please re-add plumbing via kwargs->headers or the headers kwarg; otherwise, the docs/tests/changelog should be updated to reflect their removal.
def build_search_search_get_request(  # pylint: disable=too-many-locals,too-many-statements,too-many-branches
    index_name: str,
    *,
    search_text: Optional[str] = None,
    include_total_result_count: Optional[bool] = None,
    facets: Optional[list[str]] = None,
    filter: Optional[str] = None,


- Search query and result enhancements:
- Added `RescoringOptions` model for result rescoring support.
- Added `query_source_authorization` and `enable_elevated_read` keyword arguments to `SearchClient.search`.
Copy link

Copilot AI Mar 19, 2026

Choose a reason for hiding this comment

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

CHANGELOG says "Added query_source_authorization and enable_elevated_read keyword arguments to SearchClient.search", but the generated request builders no longer serialize the corresponding x-ms headers and the public SearchClient.search customization doesn't expose these kwargs. Either re-introduce/plumb these parameters through to the REST headers (or document the correct supported kwargs), or remove this bullet to avoid misleading customers.

Suggested change
- Added `query_source_authorization` and `enable_elevated_read` keyword arguments to `SearchClient.search`.

Copilot uses AI. Check for mistakes.
Comment on lines 140 to 144
class FacetResult(_Model):
"""A single bucket of a facet query result. Reports the number of documents with a field value
falling within a particular range or having a particular value or interval.

:ivar count: The approximate count of documents falling within the bucket described by this
Copy link

Copilot AI Mar 19, 2026

Choose a reason for hiding this comment

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

Facet aggregation metric fields (avg, min, max, cardinality, etc.) were removed from FacetResult, but there are still existing tests (e.g., tests/async_tests/test_search_client_async.py) that set/assert these attributes. Update the remaining references/tests to align with the new GA model shape, otherwise the test suite will fail (or validate behavior that is no longer supported).

Copilot uses AI. Check for mistakes.
@hizixin hizixin force-pushed the search/2026-04-01-ga branch from b2ab9d7 to d691066 Compare March 19, 2026 21:55
@github-actions
Copy link

github-actions bot commented Mar 19, 2026

API Change Check

APIView identified API level changes in this PR and created the following API reviews

azure-search-documents

# Release History

## 11.7.0b3 (Unreleased)
## 12.0.0 (2026-04-01)
Copy link
Member

Choose a reason for hiding this comment

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

Major version bump?

Copy link
Member Author

@hizixin hizixin Mar 20, 2026

Choose a reason for hiding this comment

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

@xiangyan99 yes, what would you recommend?

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@hizixin hizixin force-pushed the search/2026-04-01-ga branch from 2839d1a to ce821c5 Compare March 20, 2026 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

3 participants