Skip to content

Commit e6df64f

Browse files
authored
Azure AI Search 2024-07-01 GA preparation (#40924)
Azure AI Search 2024-07-01 GA preparation
1 parent 4192fcb commit e6df64f

File tree

348 files changed

+5477
-13089
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

348 files changed

+5477
-13089
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ add the direct dependency to your project as follows.
7575
<dependency>
7676
<groupId>com.azure</groupId>
7777
<artifactId>azure-search-documents</artifactId>
78-
<version>11.7.0-beta.3</version>
78+
<version>11.7.0-beta.4</version>
7979
</dependency>
8080
```
8181
[//]: # ({x-version-update-end})

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_68da41c6ed"
5+
"Tag": "java/search/azure-search-documents_773510d633"
66
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@
107107
<groupId>com.azure</groupId>
108108
<artifactId>azure-ai-openai</artifactId>
109109
<version>1.0.0-beta.9</version> <!-- {x-version-update;com.azure:azure-ai-openai;dependency} -->
110+
<scope>test</scope>
110111
</dependency>
111112
<dependency>
112113
<groupId>org.junit.jupiter</groupId>

sdk/search/azure-search-documents/spotbugs-exclude.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
<Class name="com.azure.search.documents.indexes.models.SearchIndex" />
8181
<Class name="com.azure.search.documents.indexes.models.SearchIndexer" />
8282
<Class name="com.azure.search.documents.indexes.models.SearchIndexerIndexProjectionSelector" />
83-
<Class name="com.azure.search.documents.indexes.models.SearchIndexerIndexProjections" />
83+
<Class name="com.azure.search.documents.indexes.models.SearchIndexerIndexProjection" />
8484
<Class name="com.azure.search.documents.indexes.models.SearchIndexerIndexProjectionsParameters" />
8585
<Class name="com.azure.search.documents.indexes.models.SearchIndexerKnowledgeStore" />
8686
<Class name="com.azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreParameters" />
@@ -99,6 +99,7 @@
9999
<Class name="com.azure.search.documents.indexes.models.TextWeights" />
100100
<Class name="com.azure.search.documents.indexes.models.VectorSearch" />
101101
<Class name="com.azure.search.documents.indexes.models.WebApiSkill" />
102+
<Class name="com.azure.search.documents.indexes.models.WebApiVectorizerParameters"/>
102103
<Class name="com.azure.search.documents.indexes.models.WordDelimiterTokenFilter" />
103104
<Class name="com.azure.search.documents.models.AutocompleteOptions" />
104105
<Class name="com.azure.search.documents.models.AutocompleteResult" />
@@ -188,7 +189,7 @@
188189
<Class name="com.azure.search.documents.indexes.models.SearchIndex" />
189190
<Class name="com.azure.search.documents.indexes.models.SearchIndexer" />
190191
<Class name="com.azure.search.documents.indexes.models.SearchIndexerIndexProjectionSelector" />
191-
<Class name="com.azure.search.documents.indexes.models.SearchIndexerIndexProjections" />
192+
<Class name="com.azure.search.documents.indexes.models.SearchIndexerIndexProjection" />
192193
<Class name="com.azure.search.documents.indexes.models.SearchIndexerIndexProjectionsParameters" />
193194
<Class name="com.azure.search.documents.indexes.models.SearchIndexerKnowledgeStore" />
194195
<Class name="com.azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreParameters" />
@@ -207,6 +208,7 @@
207208
<Class name="com.azure.search.documents.indexes.models.TextWeights" />
208209
<Class name="com.azure.search.documents.indexes.models.VectorSearch" />
209210
<Class name="com.azure.search.documents.indexes.models.WebApiSkill" />
211+
<Class name="com.azure.search.documents.indexes.models.WebApiVectorizerParameters"/>
210212
<Class name="com.azure.search.documents.indexes.models.WordDelimiterTokenFilter" />
211213
<Class name="com.azure.search.documents.models.AutocompleteOptions" />
212214
<Class name="com.azure.search.documents.models.AutocompleteResult" />

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ public String getIndexName() {
343343
*
344344
* @return the pipeline.
345345
*/
346-
public HttpPipeline getHttpPipeline() {
346+
HttpPipeline getHttpPipeline() {
347347
return this.httpPipeline;
348348
}
349349

@@ -1315,9 +1315,7 @@ static SearchRequest createSearchRequest(String searchText, SearchOptions option
13151315
.setSessionId(options.getSessionId())
13161316
.setSelect(nullSafeStringJoin(options.getSelect()))
13171317
.setSkip(options.getSkip())
1318-
.setTop(options.getTop())
1319-
.setQueryLanguage(options.getQueryLanguage())
1320-
.setSpeller(options.getSpeller());
1318+
.setTop(options.getTop());
13211319

13221320
SemanticSearchOptions semanticSearchOptions = options.getSemanticSearchOptions();
13231321
if (semanticSearchOptions != null) {
@@ -1328,9 +1326,7 @@ static SearchRequest createSearchRequest(String searchText, SearchOptions option
13281326
.setSemanticMaxWaitInMilliseconds(waitInMillis)
13291327
.setAnswers(createSearchRequestAnswers(semanticSearchOptions.getQueryAnswer()))
13301328
.setCaptions(createSearchRequestCaptions(semanticSearchOptions.getQueryCaption()))
1331-
.setSemanticQuery(semanticSearchOptions.getSemanticQuery())
1332-
.setSemanticFields(nullSafeStringJoin(semanticSearchOptions.getSemanticFields()))
1333-
.setDebug(semanticSearchOptions.getDebug());
1329+
.setSemanticQuery(semanticSearchOptions.getSemanticQuery());
13341330
}
13351331

13361332
VectorSearchOptions vectorSearchOptions = options.getVectorSearchOptions();
@@ -1339,7 +1335,6 @@ static SearchRequest createSearchRequest(String searchText, SearchOptions option
13391335
.setVectorQueries(vectorSearchOptions.getQueries());
13401336
}
13411337

1342-
request.setHybridSearch(options.getHybridSearch());
13431338

13441339
return request;
13451340
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
import com.azure.search.documents.implementation.SearchIndexClientImpl;
1616
import com.azure.search.documents.implementation.converters.IndexActionConverter;
1717
import com.azure.search.documents.implementation.models.AutocompleteRequest;
18+
import com.azure.search.documents.implementation.models.ErrorResponseException;
1819
import com.azure.search.documents.implementation.models.SearchContinuationToken;
1920
import com.azure.search.documents.implementation.models.SearchDocumentsResult;
20-
import com.azure.search.documents.implementation.models.SearchErrorException;
2121
import com.azure.search.documents.implementation.models.SearchFirstPageResponseWrapper;
2222
import com.azure.search.documents.implementation.models.SearchRequest;
2323
import com.azure.search.documents.implementation.models.SuggestDocumentsResult;
@@ -334,7 +334,7 @@ public String getIndexName() {
334334
*
335335
* @return the pipeline.
336336
*/
337-
public HttpPipeline getHttpPipeline() {
337+
HttpPipeline getHttpPipeline() {
338338
return this.httpPipeline;
339339
}
340340

@@ -839,8 +839,8 @@ public <T> Response<T> getDocumentWithResponse(String key, Class<T> modelClass,
839839

840840
return new SimpleResponse<>(response, serializer.deserializeFromBytes(
841841
serializer.serializeToBytes(response.getValue()), createInstance(modelClass)));
842-
} catch (SearchErrorException ex) {
843-
throw LOGGER.logExceptionAsError(Utility.mapSearchErrorException(ex));
842+
} catch (ErrorResponseException ex) {
843+
throw LOGGER.logExceptionAsError(Utility.mapErrorResponseException(ex));
844844
} catch (RuntimeException ex) {
845845
throw LOGGER.logExceptionAsError(ex);
846846
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ public enum SearchServiceVersion implements ServiceVersion {
2020
V2023_11_01("2023-11-01"),
2121

2222
/**
23-
* {@code 2024-03-01-preview} service version.
23+
* {@code 2024-07-01} service version.
2424
*/
25-
V2024_03_01_PREVIEW("2024-03-01-preview");
25+
V2024_07_01("2024-07-01");
2626

2727
private final String version;
2828

@@ -44,6 +44,6 @@ public String getVersion() {
4444
* @return The latest version supported by this client library.
4545
*/
4646
public static SearchServiceVersion getLatest() {
47-
return V2024_03_01_PREVIEW;
47+
return V2024_07_01;
4848
}
4949
}

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

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ public final class DocumentsImpl {
6666
}
6767

6868
/**
69-
* The interface defining all the services for SearchIndexClientDocuments to be used by the proxy service to
70-
* perform REST calls.
69+
* The interface defining all the services for SearchIndexClientDocuments to be used by the proxy service to perform
70+
* REST calls.
7171
*/
7272
@Host("{endpoint}/indexes('{indexName}')")
7373
@ServiceInterface(name = "SearchIndexClientDoc")
@@ -422,8 +422,11 @@ public Mono<Response<Map<String, Object>>> getWithResponseAsync(String key, List
422422
xMsClientRequestIdInternal = requestOptions.getXMsClientRequestId();
423423
}
424424
UUID xMsClientRequestId = xMsClientRequestIdInternal;
425-
String selectedFieldsConverted = (selectedFields == null) ? null : selectedFields.stream()
426-
.map(paramItemValue -> Objects.toString(paramItemValue, "")).collect(Collectors.joining(","));
425+
String selectedFieldsConverted = (selectedFields == null)
426+
? null
427+
: selectedFields.stream()
428+
.map(paramItemValue -> Objects.toString(paramItemValue, ""))
429+
.collect(Collectors.joining(","));
427430
return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getIndexName(), key,
428431
selectedFieldsConverted, this.client.getApiVersion(), xMsClientRequestId, accept, context));
429432
}
@@ -451,8 +454,11 @@ public Mono<Response<Map<String, Object>>> getWithResponseAsync(String key, List
451454
xMsClientRequestIdInternal = requestOptions.getXMsClientRequestId();
452455
}
453456
UUID xMsClientRequestId = xMsClientRequestIdInternal;
454-
String selectedFieldsConverted = (selectedFields == null) ? null : selectedFields.stream()
455-
.map(paramItemValue -> Objects.toString(paramItemValue, "")).collect(Collectors.joining(","));
457+
String selectedFieldsConverted = (selectedFields == null)
458+
? null
459+
: selectedFields.stream()
460+
.map(paramItemValue -> Objects.toString(paramItemValue, ""))
461+
.collect(Collectors.joining(","));
456462
return service.get(this.client.getEndpoint(), this.client.getIndexName(), key, selectedFieldsConverted,
457463
this.client.getApiVersion(), xMsClientRequestId, accept, context);
458464
}
@@ -517,8 +523,11 @@ public Response<Map<String, Object>> getWithResponse(String key, List<String> se
517523
xMsClientRequestIdInternal = requestOptions.getXMsClientRequestId();
518524
}
519525
UUID xMsClientRequestId = xMsClientRequestIdInternal;
520-
String selectedFieldsConverted = (selectedFields == null) ? null : selectedFields.stream()
521-
.map(paramItemValue -> Objects.toString(paramItemValue, "")).collect(Collectors.joining(","));
526+
String selectedFieldsConverted = (selectedFields == null)
527+
? null
528+
: selectedFields.stream()
529+
.map(paramItemValue -> Objects.toString(paramItemValue, ""))
530+
.collect(Collectors.joining(","));
522531
return service.getSync(this.client.getEndpoint(), this.client.getIndexName(), key, selectedFieldsConverted,
523532
this.client.getApiVersion(), xMsClientRequestId, accept, context);
524533
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
3-
//
3+
//
44
// Code generated by Microsoft (R) AutoRest Code Generator.
55
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
66

sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/implementation/converters/SearchResultConverter.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ public static SearchResult map(com.azure.search.documents.implementation.models.
2424
SearchResult searchResult = new SearchResult(obj.getScore());
2525

2626
SearchResultHelper.setHighlights(searchResult, obj.getHighlights());
27-
SearchResultHelper.setSemanticSearchResults(searchResult, obj.getRerankerScore(), obj.getCaptions(),
28-
obj.getDocumentDebugInfo());
27+
SearchResultHelper.setSemanticSearchResults(searchResult, obj.getRerankerScore(), obj.getCaptions());
2928
SearchResultHelper.setAdditionalProperties(searchResult, new SearchDocument(obj.getAdditionalProperties()));
3029
SearchResultHelper.setJsonSerializer(searchResult, (JsonSerializer) serializer);
3130
return searchResult;

0 commit comments

Comments
 (0)