Skip to content

Commit 6aa7564

Browse files
authored
Search March Preview Regen (Azure#44763)
* Search March Preview Regen * Search March Preview Regen * Search March Preview Regen * Search March Preview Regen * Disabling tests that need local auth * Fix analyze phase issues * Fix analyze phase issues * Adjust check requirement * Adjust check requirement * CHANGELOG.md adjustment
1 parent bcf3287 commit 6aa7564

25 files changed

+933
-108
lines changed

sdk/search/azure-search-documents/CHANGELOG.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
# Release History
22

3-
## 11.8.0-beta.6 (Unreleased)
3+
## 11.8.0-beta.6 (2025-04-16)
44

55
### Features Added
66

7-
### Breaking Changes
8-
9-
### Bugs Fixed
7+
- Introduced new api `getIndexStatsSummary` into `SearchIndexClient` and `SearchIndexAsyncClient` to enable the retrieval of index stats summary.
8+
- Introduced `flightingOptIn` field onto `SemanticConfiguration` to enable flighting opt-in for semantic search.
109

1110
### Other Changes
1211

12+
- Binary Quantization now supports configuring `rescoringOptions` to `true` with `rescoreStorageMethod` set to `discardOriginals`.
13+
1314
## 11.7.6 (2025-03-24)
1415

1516
### Other Changes
@@ -21,7 +22,6 @@
2122
- Upgraded `azure-core-serializer-json-jackson` from `1.5.7` to version `1.5.8`.
2223
- Upgraded `azure-core` from `1.55.2` to version `1.55.3`.
2324

24-
2525
## 11.7.5 (2025-02-25)
2626

2727
### Other Changes

sdk/search/azure-search-documents/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "java",
44
"TagPrefix": "java/search/azure-search-documents",
5-
"Tag": "java/search/azure-search-documents_0bac7cbf4b"
5+
"Tag": "java/search/azure-search-documents_8d90b12483"
66
}

sdk/search/azure-search-documents/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
2525
<!-- Coverage used to be higher but between additional, unused generated client APIs and unused models' JSON serialization it has been lowered. -->
2626
<!-- In the future this will be cleaned up and coverage should be increased again. -->
27-
<jacoco.min.linecoverage>0.55</jacoco.min.linecoverage>
28-
<jacoco.min.branchcoverage>0.46</jacoco.min.branchcoverage>
27+
<jacoco.min.linecoverage>0.52</jacoco.min.linecoverage>
28+
<jacoco.min.branchcoverage>0.42</jacoco.min.branchcoverage>
2929
<!-- 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. -->
3030
<javaModulesSurefireArgLine>
3131
--add-exports com.azure.core/com.azure.core.implementation.http=ALL-UNNAMED

sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchClient.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,4 +1178,5 @@ private AutocompletePagedResponse autocomplete(AutocompleteRequest request, Cont
11781178
return new AutocompletePagedResponse(new SimpleResponse<>(response, response.getValue()));
11791179
}, LOGGER);
11801180
}
1181+
11811182
}

sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/SearchServiceVersion.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public enum SearchServiceVersion implements ServiceVersion {
2727
/**
2828
* {@code 2024-11-01-preview} service version.
2929
*/
30-
V2024_11_01_PREVIEW("2024-11-01-preview");
30+
V2025_03_01_PREVIEW("2025-03-01-preview");
3131

3232
private final String version;
3333

@@ -49,6 +49,6 @@ public String getVersion() {
4949
* @return The latest version supported by this client library.
5050
*/
5151
public static SearchServiceVersion getLatest() {
52-
return V2024_11_01_PREVIEW;
52+
return V2025_03_01_PREVIEW;
5353
}
5454
}

sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/implementation/models/SearchDocumentsResult.java

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ public final class SearchDocumentsResult implements JsonSerializable<SearchDocum
5151
*/
5252
private List<QueryAnswerResult> answers;
5353

54+
/*
55+
* Debug information that applies to the search results as a whole.
56+
*/
57+
private DebugInfo debugInfo;
58+
5459
/*
5560
* Continuation JSON payload returned when the query can't return all the requested results in a single response.
5661
* You can use this JSON along with @odata.nextLink to formulate another POST Search request to get the next part of
@@ -85,11 +90,6 @@ public final class SearchDocumentsResult implements JsonSerializable<SearchDocum
8590
*/
8691
private SemanticQueryRewritesResultType semanticQueryRewritesResultType;
8792

88-
/*
89-
* Debug information that applies to the search results as a whole.
90-
*/
91-
private DebugInfo debugInfo;
92-
9393
/**
9494
* Creates an instance of SearchDocumentsResult class.
9595
*
@@ -141,6 +141,15 @@ public List<QueryAnswerResult> getAnswers() {
141141
return this.answers;
142142
}
143143

144+
/**
145+
* Get the debugInfo property: Debug information that applies to the search results as a whole.
146+
*
147+
* @return the debugInfo value.
148+
*/
149+
public DebugInfo getDebugInfo() {
150+
return this.debugInfo;
151+
}
152+
144153
/**
145154
* Get the nextPageParameters property: Continuation JSON payload returned when the query can't return all the
146155
* requested results in a single response. You can use this JSON along with &#064;odata.nextLink to formulate
@@ -201,15 +210,6 @@ public SemanticQueryRewritesResultType getSemanticQueryRewritesResultType() {
201210
return this.semanticQueryRewritesResultType;
202211
}
203212

204-
/**
205-
* Get the debugInfo property: Debug information that applies to the search results as a whole.
206-
*
207-
* @return the debugInfo value.
208-
*/
209-
public DebugInfo getDebugInfo() {
210-
return this.debugInfo;
211-
}
212-
213213
/**
214214
* {@inheritDoc}
215215
*/
@@ -236,12 +236,12 @@ public static SearchDocumentsResult fromJson(JsonReader jsonReader) throws IOExc
236236
Double coverage = null;
237237
Map<String, List<FacetResult>> facets = null;
238238
List<QueryAnswerResult> answers = null;
239+
DebugInfo debugInfo = null;
239240
SearchRequest nextPageParameters = null;
240241
String nextLink = null;
241242
SemanticErrorReason semanticPartialResponseReason = null;
242243
SemanticSearchResultsType semanticPartialResponseType = null;
243244
SemanticQueryRewritesResultType semanticQueryRewritesResultType = null;
244-
DebugInfo debugInfo = null;
245245
while (reader.nextToken() != JsonToken.END_OBJECT) {
246246
String fieldName = reader.getFieldName();
247247
reader.nextToken();
@@ -257,6 +257,8 @@ public static SearchDocumentsResult fromJson(JsonReader jsonReader) throws IOExc
257257
facets = reader.readMap(reader1 -> reader1.readArray(reader2 -> FacetResult.fromJson(reader2)));
258258
} else if ("@search.answers".equals(fieldName)) {
259259
answers = reader.readArray(reader1 -> QueryAnswerResult.fromJson(reader1));
260+
} else if ("@search.debug".equals(fieldName)) {
261+
debugInfo = DebugInfo.fromJson(reader);
260262
} else if ("@search.nextPageParameters".equals(fieldName)) {
261263
nextPageParameters = SearchRequest.fromJson(reader);
262264
} else if ("@odata.nextLink".equals(fieldName)) {
@@ -267,8 +269,6 @@ public static SearchDocumentsResult fromJson(JsonReader jsonReader) throws IOExc
267269
semanticPartialResponseType = SemanticSearchResultsType.fromString(reader.getString());
268270
} else if ("@search.semanticQueryRewritesResultType".equals(fieldName)) {
269271
semanticQueryRewritesResultType = SemanticQueryRewritesResultType.fromString(reader.getString());
270-
} else if ("@search.debug".equals(fieldName)) {
271-
debugInfo = DebugInfo.fromJson(reader);
272272
} else {
273273
reader.skipChildren();
274274
}
@@ -279,12 +279,12 @@ public static SearchDocumentsResult fromJson(JsonReader jsonReader) throws IOExc
279279
deserializedSearchDocumentsResult.coverage = coverage;
280280
deserializedSearchDocumentsResult.facets = facets;
281281
deserializedSearchDocumentsResult.answers = answers;
282+
deserializedSearchDocumentsResult.debugInfo = debugInfo;
282283
deserializedSearchDocumentsResult.nextPageParameters = nextPageParameters;
283284
deserializedSearchDocumentsResult.nextLink = nextLink;
284285
deserializedSearchDocumentsResult.semanticPartialResponseReason = semanticPartialResponseReason;
285286
deserializedSearchDocumentsResult.semanticPartialResponseType = semanticPartialResponseType;
286287
deserializedSearchDocumentsResult.semanticQueryRewritesResultType = semanticQueryRewritesResultType;
287-
deserializedSearchDocumentsResult.debugInfo = debugInfo;
288288

289289
return deserializedSearchDocumentsResult;
290290
}

sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexAsyncClient.java

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@
2020
import com.azure.search.documents.implementation.util.FieldBuilder;
2121
import com.azure.search.documents.implementation.util.MappingUtils;
2222
import com.azure.search.documents.indexes.implementation.SearchServiceClientImpl;
23+
import com.azure.search.documents.indexes.implementation.models.ErrorResponseException;
2324
import com.azure.search.documents.indexes.implementation.models.ListSynonymMapsResult;
2425
import com.azure.search.documents.indexes.models.AnalyzeTextOptions;
2526
import com.azure.search.documents.indexes.models.AnalyzedTokenInfo;
2627
import com.azure.search.documents.indexes.models.FieldBuilderOptions;
28+
import com.azure.search.documents.indexes.models.IndexStatisticsSummary;
2729
import com.azure.search.documents.indexes.models.SearchField;
2830
import com.azure.search.documents.indexes.models.SearchIndex;
2931
import com.azure.search.documents.indexes.models.SearchIndexStatistics;
@@ -1241,4 +1243,27 @@ Mono<Response<SearchServiceStatistics>> getServiceStatisticsWithResponse(Context
12411243
return monoError(LOGGER, ex);
12421244
}
12431245
}
1246+
1247+
/**
1248+
* Retrieves a summary of statistics for all indexes in the search service.
1249+
*
1250+
* @throws IllegalArgumentException thrown if parameters fail the validation.
1251+
* @throws ErrorResponseException thrown if the request is rejected by server.
1252+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
1253+
* @return response from a request to retrieve stats summary of all indexes as paginated response with
1254+
* {@link PagedFlux}.
1255+
*/
1256+
@ServiceMethod(returns = ReturnType.COLLECTION)
1257+
public PagedFlux<IndexStatisticsSummary> getIndexStatsSummary() {
1258+
return getIndexStatsSummary(Context.NONE);
1259+
}
1260+
1261+
PagedFlux<IndexStatisticsSummary> getIndexStatsSummary(Context context) {
1262+
try {
1263+
return restClient.getIndexStatsSummaryAsync(null, context);
1264+
} catch (RuntimeException ex) {
1265+
RuntimeException mappedException = (RuntimeException) MappingUtils.exceptionMapper(ex);
1266+
return pagedFluxError(LOGGER, mappedException);
1267+
}
1268+
}
12441269
}

sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/SearchIndexClient.java

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@
1818
import com.azure.search.documents.implementation.util.MappingUtils;
1919
import com.azure.search.documents.implementation.util.Utility;
2020
import com.azure.search.documents.indexes.implementation.SearchServiceClientImpl;
21+
import com.azure.search.documents.indexes.implementation.models.ErrorResponseException;
2122
import com.azure.search.documents.indexes.implementation.models.ListSynonymMapsResult;
2223
import com.azure.search.documents.indexes.models.AnalyzeTextOptions;
2324
import com.azure.search.documents.indexes.models.AnalyzedTokenInfo;
2425
import com.azure.search.documents.indexes.models.FieldBuilderOptions;
26+
import com.azure.search.documents.indexes.models.IndexStatisticsSummary;
2527
import com.azure.search.documents.indexes.models.LexicalAnalyzerName;
2628
import com.azure.search.documents.indexes.models.LexicalTokenizerName;
2729
import com.azure.search.documents.indexes.models.SearchField;
@@ -1265,14 +1267,44 @@ public Response<SearchServiceStatistics> getServiceStatisticsWithResponse(Contex
12651267
}
12661268

12671269
/**
1268-
* Convenience method to convert a {@link Class Class's} {@link Field Fields} and {@link Method Methods} into {@link
1269-
* SearchField SearchFields} to help aid the creation of a {@link SearchField} which represents the {@link Class}.
1270+
* Retrieves a summary of statistics for all indexes in the search service.
12701271
*
1271-
* @param model The model {@link Class} that will have {@link SearchField SearchFields} generated from its
1272-
* structure.
1273-
* @param options Configuration used to determine generation of the {@link SearchField SearchFields}.
1274-
* @return A list {@link SearchField SearchFields} which represent the model {@link Class}.
1272+
* @throws IllegalArgumentException thrown if parameters fail the validation.
1273+
* @throws ErrorResponseException thrown if the request is rejected by server.
1274+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
1275+
* @return response from a request to retrieve stats summary of all indexes as paginated response with
1276+
* {@link PagedIterable}.
12751277
*/
1278+
@ServiceMethod(returns = ReturnType.COLLECTION)
1279+
public PagedIterable<IndexStatisticsSummary> getIndexStatsSummary() {
1280+
return Utility.executeRestCallWithExceptionHandling(() -> restClient.getIndexStatsSummary(null), LOGGER);
1281+
}
1282+
1283+
/**
1284+
* Retrieves a summary of statistics for all indexes in the search service.
1285+
*
1286+
* @param context The context to associate with this operation.
1287+
* @throws IllegalArgumentException thrown if parameters fail the validation.
1288+
* @throws ErrorResponseException thrown if the request is rejected by server.
1289+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
1290+
* @return response from a request to retrieve stats summary of all indexes as paginated response with
1291+
* {@link PagedResponse}.
1292+
*/
1293+
@ServiceMethod(returns = ReturnType.COLLECTION)
1294+
public PagedIterable<IndexStatisticsSummary> getIndexStatsSummary(Context context) {
1295+
return Utility.executeRestCallWithExceptionHandling(() -> restClient.getIndexStatsSummary(null, context),
1296+
LOGGER);
1297+
}
1298+
1299+
/**
1300+
* Convenience method to convert a {@link Class Class's} {@link Field Fields} and {@link Method Methods} into {@link
1301+
* SearchField SearchFields} to help aid the creation of a {@link SearchField} which represents the {@link Class}.
1302+
*
1303+
* @param model The model {@link Class} that will have {@link SearchField SearchFields} generated from its
1304+
* structure.
1305+
* @param options Configuration used to determine generation of the {@link SearchField SearchFields}.
1306+
* @return A list {@link SearchField SearchFields} which represent the model {@link Class}.
1307+
*/
12761308
public static List<SearchField> buildSearchFields(Class<?> model, FieldBuilderOptions options) {
12771309
return SearchIndexAsyncClient.buildSearchFields(model, options);
12781310
}

0 commit comments

Comments
 (0)