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
8 changes: 8 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,16 @@

### Features Added

- Support for `2025-08-01-Preview` service version.
- Added support for Knowledge Agent knowledge sources.
- Added support for Knowledge Agent answer synthesis.
- Added `VectorFilterMode.STRICT_POST_FILTER`.

### Breaking Changes

- Dropped support for `2025-05-01-Preview` service version.
- Dropped support for Knowledge Agent target index. Use knowledge sources instead.

### Bugs Fixed

### Other Changes
Expand Down
2 changes: 1 addition & 1 deletion sdk/search/azure-search-documents/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "java",
"TagPrefix": "java/search/azure-search-documents",
"Tag": "java/search/azure-search-documents_ab303259b0"
"Tag": "java/search/azure-search-documents_93e02a04a0"
}
4 changes: 2 additions & 2 deletions sdk/search/azure-search-documents/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- Coverage used to be higher but between additional, unused generated client APIs and unused models' JSON serialization it has been lowered. -->
<!-- In the future this will be cleaned up and coverage should be increased again. -->
<jacoco.min.linecoverage>0.46</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0.40</jacoco.min.branchcoverage>
<jacoco.min.linecoverage>0.42</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0.35</jacoco.min.branchcoverage>
<!-- Configures the Java 9+ run to perform the required module exports, opens, and reads that are necessary for testing but shouldn't be part of the module-info. -->
<javaModulesSurefireArgLine>
--add-exports com.azure.core/com.azure.core.implementation.http=ALL-UNNAMED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ public enum SearchServiceVersion implements ServiceVersion {
V2024_07_01("2024-07-01"),

/**
* {@code 2024-11-01-preview} service version.
* {@code 2025-08-01-preview} service version.
*/
V2025_05_01_PREVIEW("2025-05-01-preview");
V2025_08_01_PREVIEW("2025-08-01-preview");

private final String version;

Expand All @@ -49,6 +49,6 @@ public String getVersion() {
* @return The latest version supported by this client library.
*/
public static SearchServiceVersion getLatest() {
return V2025_05_01_PREVIEW;
return V2025_08_01_PREVIEW;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

package com.azure.search.documents.agents.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.annotation.Generated;
import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
Expand All @@ -17,7 +17,7 @@
/**
* Base type for activity records.
*/
@Immutable
@Fluent
public class KnowledgeAgentActivityRecord implements JsonSerializable<KnowledgeAgentActivityRecord> {
/*
* The type of the activity record.
Expand All @@ -31,6 +31,12 @@ public class KnowledgeAgentActivityRecord implements JsonSerializable<KnowledgeA
@Generated
private final int id;

/*
* The elapsed time in milliseconds for the retrieval activity.
*/
@Generated
private Integer elapsedMs;

/**
* Creates an instance of KnowledgeAgentActivityRecord class.
*
Expand Down Expand Up @@ -61,6 +67,28 @@ public int getId() {
return this.id;
}

/**
* Get the elapsedMs property: The elapsed time in milliseconds for the retrieval activity.
*
* @return the elapsedMs value.
*/
@Generated
public Integer getElapsedMs() {
return this.elapsedMs;
}

/**
* Set the elapsedMs property: The elapsed time in milliseconds for the retrieval activity.
*
* @param elapsedMs the elapsedMs value to set.
* @return the KnowledgeAgentActivityRecord object itself.
*/
@Generated
public KnowledgeAgentActivityRecord setElapsedMs(Integer elapsedMs) {
this.elapsedMs = elapsedMs;
return this;
}

/**
* {@inheritDoc}
*/
Expand All @@ -70,6 +98,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeIntField("id", this.id);
jsonWriter.writeStringField("type", this.type);
jsonWriter.writeNumberField("elapsedMs", this.elapsedMs);
return jsonWriter.writeEndObject();
}

Expand Down Expand Up @@ -99,12 +128,20 @@ public static KnowledgeAgentActivityRecord fromJson(JsonReader jsonReader) throw
}
}
// Use the discriminator value to determine which subtype should be deserialized.
if ("AzureSearchQuery".equals(discriminatorValue)) {
return KnowledgeAgentSearchActivityRecord.fromJson(readerToUse.reset());
} else if ("ModelQueryPlanning".equals(discriminatorValue)) {
if ("KnowledgeAgentRetrievalActivityRecord".equals(discriminatorValue)) {
return KnowledgeAgentRetrievalActivityRecord.fromJsonKnownDiscriminator(readerToUse.reset());
} else if ("searchIndex".equals(discriminatorValue)) {
return KnowledgeAgentSearchIndexActivityRecord.fromJson(readerToUse.reset());
} else if ("azureBlob".equals(discriminatorValue)) {
return KnowledgeAgentAzureBlobActivityRecord.fromJson(readerToUse.reset());
} else if ("web".equals(discriminatorValue)) {
return KnowledgeAgentWebActivityRecord.fromJson(readerToUse.reset());
} else if ("modelQueryPlanning".equals(discriminatorValue)) {
return KnowledgeAgentModelQueryPlanningActivityRecord.fromJson(readerToUse.reset());
} else if ("AzureSearchSemanticRanker".equals(discriminatorValue)) {
return KnowledgeAgentSemanticRankerActivityRecord.fromJson(readerToUse.reset());
} else if ("modelAnswerSynthesis".equals(discriminatorValue)) {
return KnowledgeAgentModelAnswerSynthesisActivityRecord.fromJson(readerToUse.reset());
} else if ("semanticReranker".equals(discriminatorValue)) {
return KnowledgeAgentSemanticRerankerActivityRecord.fromJson(readerToUse.reset());
} else {
return fromJsonKnownDiscriminator(readerToUse.reset());
}
Expand All @@ -118,6 +155,7 @@ static KnowledgeAgentActivityRecord fromJsonKnownDiscriminator(JsonReader jsonRe
boolean idFound = false;
int id = 0;
String type = null;
Integer elapsedMs = null;
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
Expand All @@ -127,6 +165,8 @@ static KnowledgeAgentActivityRecord fromJsonKnownDiscriminator(JsonReader jsonRe
idFound = true;
} else if ("type".equals(fieldName)) {
type = reader.getString();
} else if ("elapsedMs".equals(fieldName)) {
elapsedMs = reader.getNullable(JsonReader::getInt);
} else {
reader.skipChildren();
}
Expand All @@ -135,6 +175,7 @@ static KnowledgeAgentActivityRecord fromJsonKnownDiscriminator(JsonReader jsonRe
KnowledgeAgentActivityRecord deserializedKnowledgeAgentActivityRecord
= new KnowledgeAgentActivityRecord(id);
deserializedKnowledgeAgentActivityRecord.type = type;
deserializedKnowledgeAgentActivityRecord.elapsedMs = elapsedMs;

return deserializedKnowledgeAgentActivityRecord;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

package com.azure.search.documents.agents.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.annotation.Generated;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;

/**
* Represents the arguments the azure blob retrieval activity was run with.
*/
@Fluent
public final class KnowledgeAgentAzureBlobActivityArguments
implements JsonSerializable<KnowledgeAgentAzureBlobActivityArguments> {
/*
* The search string used to query blob contents.
*/
@Generated
private String search;

/**
* Creates an instance of KnowledgeAgentAzureBlobActivityArguments class.
*/
@Generated
public KnowledgeAgentAzureBlobActivityArguments() {
}

/**
* Get the search property: The search string used to query blob contents.
*
* @return the search value.
*/
@Generated
public String getSearch() {
return this.search;
}

/**
* Set the search property: The search string used to query blob contents.
*
* @param search the search value to set.
* @return the KnowledgeAgentAzureBlobActivityArguments object itself.
*/
@Generated
public KnowledgeAgentAzureBlobActivityArguments setSearch(String search) {
this.search = search;
return this;
}

/**
* {@inheritDoc}
*/
@Generated
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("search", this.search);
return jsonWriter.writeEndObject();
}

/**
* Reads an instance of KnowledgeAgentAzureBlobActivityArguments from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of KnowledgeAgentAzureBlobActivityArguments if the JsonReader was pointing to an instance of
* it, or null if it was pointing to JSON null.
* @throws IOException If an error occurs while reading the KnowledgeAgentAzureBlobActivityArguments.
*/
@Generated
public static KnowledgeAgentAzureBlobActivityArguments fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
KnowledgeAgentAzureBlobActivityArguments deserializedKnowledgeAgentAzureBlobActivityArguments
= new KnowledgeAgentAzureBlobActivityArguments();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();

if ("search".equals(fieldName)) {
deserializedKnowledgeAgentAzureBlobActivityArguments.search = reader.getString();
} else {
reader.skipChildren();
}
}

return deserializedKnowledgeAgentAzureBlobActivityArguments;
});
}
}
Loading
Loading