Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions sdk/search/azure-search-documents/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,32 @@

### Features Added

- Added support for the `2026-08-01-Preview` service version, which is now the default service version.
- Added File knowledge source file management APIs on `SearchIndexClient`/`SearchIndexAsyncClient`, including
`uploadKnowledgeSourceFileMultipart` and `updateKnowledgeSourceFile`, along with the supporting models
`FileUploadMetadata`, `ContentFileDetails`, `UploadKnowledgeSourceFileMultipartRequest`,
`UpdateKnowledgeSourceFileRequest`, and `FileKnowledgeSourceExtractionMode`.
- Added knowledge source query hint and boosting models: `SearchIndexKnowledgeSourceQueryHints`,
`SearchIndexKnowledgeSourceBoost`, `SearchIndexKnowledgeSourceBoostKind`,
`SearchIndexKnowledgeSourceFieldValueBoost`, `SearchIndexKnowledgeSourceMultiWordExpressionBoost`,
`SearchIndexKnowledgeSourceFilterHint`, and `KnowledgeSourceResultsProcessing`.
- Added knowledge base retrieval models `KnowledgeBaseActivityRecordModel`, `KnowledgeBaseQueryHintProcessing`,
`KnowledgeBaseRetrieveDefaults`, and `KnowledgeRetrievalAutoReasoningEffort`.
- Added `EntraAppAuthentication`, `KnowledgeSourceNetworkAccessMode`, `ServedImage`, and `ListingSearchType` models.

### Breaking Changes

- `WorkIQKnowledgeSource` now takes a `com.azure.search.documents.models.WorkIQKnowledgeSourceParameters`.
- Removed the offset-based `listIndexesWithSelectedProperties(List<String> select, Integer top, Integer skip, Boolean count)`
overload from `SearchIndexClient`/`SearchIndexAsyncClient`. Use `listIndexesWithSelectedProperties()` or
`listIndexesWithSelectedProperties(List<String> select)`.
- Changed `listIndexStatsSummary` overload parameters from `(Integer top, Integer skip, Boolean count)` to
`(String search, Integer pageSize, ListingSearchType searchType)`.
- Changed the `KnowledgeBaseRetrievalClient`/`KnowledgeBaseRetrievalAsyncClient` `retrieve` overload from
`retrieve(KnowledgeBaseRetrievalOptions, String)` to
`retrieve(KnowledgeBaseRetrievalOptions, String querySourceAuthorization, String queryWorkIQSourceAuthorization)`.
- Removed the `McpServerToolInclusionMode` and `WorkIQAttribution` models.

### Bugs Fixed

### Other Changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@
<suppress files="com.azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreProjectionSelector.java" checks="io.clientcore.linting.extensions.checkstyle.checks.SerializableMethodsCheck" />
<suppress files="com.azure.search.documents.models.SearchContinuationToken.java" checks="io.clientcore.linting.extensions.checkstyle.checks.SerializableMethodsCheck" />
<suppress files="com.azure.search.documents.indexes.models.McpServerKnowledgeSourceParameters.java" checks="io.clientcore.linting.extensions.checkstyle.checks.DenyListedWordsCheck" />
<suppress files="com.azure.search.documents.implementation.MultipartFormDataHelper.java" checks="io.clientcore.linting.extensions.checkstyle.checks.EnforceFinalFieldsCheck" />
</suppressions>
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ public enum SearchServiceVersion implements ServiceVersion {
/**
* Enum value 2026-05-01-preview.
*/
V2026_05_01_PREVIEW("2026-05-01-preview");
V2026_05_01_PREVIEW("2026-05-01-preview"),
/**
* Enum value 2026-08-01-preview.
*/
V2026_08_01_PREVIEW("2026-08-01-preview");

private final String version;

Expand All @@ -59,6 +63,6 @@ public String getVersion() {
* @return The latest {@link SearchServiceVersion}.
*/
public static SearchServiceVersion getLatest() {
return V2026_05_01_PREVIEW;
return V2026_08_01_PREVIEW;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,28 @@ Response<BinaryData> retrieveSync(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept,
@PathParam("knowledgeBaseName") String knowledgeBaseName, @HeaderParam("Content-Type") String contentType,
@BodyParam("application/json") BinaryData retrievalRequest, RequestOptions requestOptions, Context context);

@Post("/knowledgebases('{knowledgeBaseName}')/retrieve")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
@UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
Mono<Response<BinaryData>> retrieveStream(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept,
@PathParam("knowledgeBaseName") String knowledgeBaseName, @HeaderParam("Content-Type") String contentType,
@BodyParam("application/json") BinaryData retrievalRequest, RequestOptions requestOptions, Context context);

@Post("/knowledgebases('{knowledgeBaseName}')/retrieve")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
@UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
Response<BinaryData> retrieveStreamSync(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept,
@PathParam("knowledgeBaseName") String knowledgeBaseName, @HeaderParam("Content-Type") String contentType,
@BodyParam("application/json") BinaryData retrievalRequest, RequestOptions requestOptions, Context context);
}

/**
Expand All @@ -199,6 +221,9 @@ Response<BinaryData> retrieveSync(@HostParam("endpoint") String endpoint,
* <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
* <tr><td>x-ms-query-source-authorization</td><td>String</td><td>No</td><td>Token identifying the user for which
* the query is being executed. This token is used to enforce security restrictions on documents.</td></tr>
* <tr><td>x-ms-query-work-iq-source-authorization</td><td>String</td><td>No</td><td>User assertion token for a
* customer-owned Entra app registration configured on a Work IQ knowledge source. Used for on-behalf-of
* authentication to the Work IQ API.</td></tr>
* </table>
* You can add these to a request with {@link RequestOptions#addHeader}
* <p><strong>Request Body Schema</strong></p>
Expand Down Expand Up @@ -226,7 +251,7 @@ Response<BinaryData> retrieveSync(@HostParam("endpoint") String endpoint,
* maxOutputDocuments: Integer (Optional)
* maxOutputSizeInTokens: Integer (Optional)
* retrievalReasoningEffort (Optional): {
* kind: String(minimal/low/medium) (Required)
* kind: String(minimal/low/medium/auto) (Required)
* }
* includeActivity: Boolean (Optional)
* outputMode: String(extractiveData/answerSynthesis) (Optional)
Expand All @@ -237,8 +262,10 @@ Response<BinaryData> retrieveSync(@HostParam("endpoint") String endpoint,
* includeReferences: Boolean (Optional)
* includeReferenceSourceData: Boolean (Optional)
* alwaysQuerySource: Boolean (Optional)
* neverQuerySource: Boolean (Optional)
* failOnError: Boolean (Optional)
* rerankerThreshold: Float (Optional)
* resultsProcessing: String(rerank/none) (Optional)
* maxOutputDocuments: Integer (Optional)
* enableImageServing: Boolean (Optional)
* }
Expand Down Expand Up @@ -336,6 +363,9 @@ public Mono<Response<BinaryData>> retrieveWithResponseAsync(BinaryData retrieval
* <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
* <tr><td>x-ms-query-source-authorization</td><td>String</td><td>No</td><td>Token identifying the user for which
* the query is being executed. This token is used to enforce security restrictions on documents.</td></tr>
* <tr><td>x-ms-query-work-iq-source-authorization</td><td>String</td><td>No</td><td>User assertion token for a
* customer-owned Entra app registration configured on a Work IQ knowledge source. Used for on-behalf-of
* authentication to the Work IQ API.</td></tr>
* </table>
* You can add these to a request with {@link RequestOptions#addHeader}
* <p><strong>Request Body Schema</strong></p>
Expand Down Expand Up @@ -363,7 +393,7 @@ public Mono<Response<BinaryData>> retrieveWithResponseAsync(BinaryData retrieval
* maxOutputDocuments: Integer (Optional)
* maxOutputSizeInTokens: Integer (Optional)
* retrievalReasoningEffort (Optional): {
* kind: String(minimal/low/medium) (Required)
* kind: String(minimal/low/medium/auto) (Required)
* }
* includeActivity: Boolean (Optional)
* outputMode: String(extractiveData/answerSynthesis) (Optional)
Expand All @@ -374,8 +404,10 @@ public Mono<Response<BinaryData>> retrieveWithResponseAsync(BinaryData retrieval
* includeReferences: Boolean (Optional)
* includeReferenceSourceData: Boolean (Optional)
* alwaysQuerySource: Boolean (Optional)
* neverQuerySource: Boolean (Optional)
* failOnError: Boolean (Optional)
* rerankerThreshold: Float (Optional)
* resultsProcessing: String(rerank/none) (Optional)
* maxOutputDocuments: Integer (Optional)
* enableImageServing: Boolean (Optional)
* }
Expand Down Expand Up @@ -461,4 +493,180 @@ public Response<BinaryData> retrieveWithResponse(BinaryData retrievalRequest, Re
return service.retrieveSync(this.getEndpoint(), this.getServiceVersion().getVersion(), accept,
this.getKnowledgeBaseName(), contentType, retrievalRequest, requestOptions, Context.NONE);
}

/**
* KnowledgeBase retrieves relevant data from backing stores, streaming progress and results as
* server-sent events on the same connection as they become available, instead of waiting for the
* full retrieval to complete.
* <p><strong>Header Parameters</strong></p>
* <table border="1">
* <caption>Header Parameters</caption>
* <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
* <tr><td>x-ms-query-source-authorization</td><td>String</td><td>No</td><td>Token identifying the user for which
* the query is being executed. This token is used to enforce security restrictions on documents.</td></tr>
* <tr><td>x-ms-query-work-iq-source-authorization</td><td>String</td><td>No</td><td>User assertion token for a
* customer-owned Entra app registration configured on a Work IQ knowledge source. Used for on-behalf-of
* authentication to the Work IQ API.</td></tr>
* </table>
* You can add these to a request with {@link RequestOptions#addHeader}
* <p><strong>Request Body Schema</strong></p>
*
* <pre>
* {@code
* {
* messages (Optional): [
* (Optional){
* role: String (Optional)
* content (Required): [
* (Required){
* type: String(text/image) (Required)
* }
* ]
* }
* ]
* intents (Optional): [
* (Optional){
* type: String(semantic) (Required)
* }
* ]
* maxRuntimeInSeconds: Integer (Optional)
* maxOutputSize: Integer (Optional)
* maxOutputDocuments: Integer (Optional)
* maxOutputSizeInTokens: Integer (Optional)
* retrievalReasoningEffort (Optional): {
* kind: String(minimal/low/medium/auto) (Required)
* }
* includeActivity: Boolean (Optional)
* outputMode: String(extractiveData/answerSynthesis) (Optional)
* knowledgeSourceParams (Optional): [
* (Optional){
* kind: String(searchIndex/azureBlob/indexedSharePoint/indexedOneLake/indexedSql/web/remoteSharePoint/workIQ/file/mcpServer/fabricDataAgent/fabricOntology) (Required)
* knowledgeSourceName: String (Required)
* includeReferences: Boolean (Optional)
* includeReferenceSourceData: Boolean (Optional)
* alwaysQuerySource: Boolean (Optional)
* neverQuerySource: Boolean (Optional)
* failOnError: Boolean (Optional)
* rerankerThreshold: Float (Optional)
* resultsProcessing: String(rerank/none) (Optional)
* maxOutputDocuments: Integer (Optional)
* enableImageServing: Boolean (Optional)
* }
* ]
* }
* }
* </pre>
*
* <p><strong>Response Body Schema</strong></p>
*
* <pre>
* {@code
* BinaryData
* }
* </pre>
*
* @param retrievalRequest The retrieval request to process.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
* @return the response body along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<BinaryData>> retrieveStreamWithResponseAsync(BinaryData retrievalRequest,
RequestOptions requestOptions) {
final String accept = "text/event-stream";
final String contentType = "application/json";
return FluxUtil
.withContext(context -> service.retrieveStream(this.getEndpoint(), this.getServiceVersion().getVersion(),
accept, this.getKnowledgeBaseName(), contentType, retrievalRequest, requestOptions, context));
}

/**
* KnowledgeBase retrieves relevant data from backing stores, streaming progress and results as
* server-sent events on the same connection as they become available, instead of waiting for the
* full retrieval to complete.
* <p><strong>Header Parameters</strong></p>
* <table border="1">
* <caption>Header Parameters</caption>
* <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
* <tr><td>x-ms-query-source-authorization</td><td>String</td><td>No</td><td>Token identifying the user for which
* the query is being executed. This token is used to enforce security restrictions on documents.</td></tr>
* <tr><td>x-ms-query-work-iq-source-authorization</td><td>String</td><td>No</td><td>User assertion token for a
* customer-owned Entra app registration configured on a Work IQ knowledge source. Used for on-behalf-of
* authentication to the Work IQ API.</td></tr>
* </table>
* You can add these to a request with {@link RequestOptions#addHeader}
* <p><strong>Request Body Schema</strong></p>
*
* <pre>
* {@code
* {
* messages (Optional): [
* (Optional){
* role: String (Optional)
* content (Required): [
* (Required){
* type: String(text/image) (Required)
* }
* ]
* }
* ]
* intents (Optional): [
* (Optional){
* type: String(semantic) (Required)
* }
* ]
* maxRuntimeInSeconds: Integer (Optional)
* maxOutputSize: Integer (Optional)
* maxOutputDocuments: Integer (Optional)
* maxOutputSizeInTokens: Integer (Optional)
* retrievalReasoningEffort (Optional): {
* kind: String(minimal/low/medium/auto) (Required)
* }
* includeActivity: Boolean (Optional)
* outputMode: String(extractiveData/answerSynthesis) (Optional)
* knowledgeSourceParams (Optional): [
* (Optional){
* kind: String(searchIndex/azureBlob/indexedSharePoint/indexedOneLake/indexedSql/web/remoteSharePoint/workIQ/file/mcpServer/fabricDataAgent/fabricOntology) (Required)
* knowledgeSourceName: String (Required)
* includeReferences: Boolean (Optional)
* includeReferenceSourceData: Boolean (Optional)
* alwaysQuerySource: Boolean (Optional)
* neverQuerySource: Boolean (Optional)
* failOnError: Boolean (Optional)
* rerankerThreshold: Float (Optional)
* resultsProcessing: String(rerank/none) (Optional)
* maxOutputDocuments: Integer (Optional)
* enableImageServing: Boolean (Optional)
* }
* ]
* }
* }
* </pre>
*
* <p><strong>Response Body Schema</strong></p>
*
* <pre>
* {@code
* BinaryData
* }
* </pre>
*
* @param retrievalRequest The retrieval request to process.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
* @return the response body along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<BinaryData> retrieveStreamWithResponse(BinaryData retrievalRequest, RequestOptions requestOptions) {
final String accept = "text/event-stream";
final String contentType = "application/json";
return service.retrieveStreamSync(this.getEndpoint(), this.getServiceVersion().getVersion(), accept,
this.getKnowledgeBaseName(), contentType, retrievalRequest, requestOptions, Context.NONE);
}
}
Loading
Loading