Skip to content

Commit 6b8ec3d

Browse files
authored
Regenerate azure-search-documents on New SHA (Azure#25270)
Regenerate azure-search-documents on New SHA
1 parent aeddab2 commit 6b8ec3d

File tree

15 files changed

+633
-39
lines changed

15 files changed

+633
-39
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,6 +1078,7 @@ private static SearchRequest createSearchRequest(String searchText, SearchOption
10781078
.setQueryType(options.getQueryType())
10791079
.setScoringParameters(scoringParameters)
10801080
.setScoringProfile(options.getScoringProfile())
1081+
.setSemanticConfiguration(options.getSemanticConfigurationName())
10811082
.setSearchFields(nullSafeStringJoin(options.getSearchFields()))
10821083
.setQueryLanguage(options.getQueryLanguage())
10831084
.setSpeller(options.getSpeller())

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ Mono<Response<SearchDocumentsResult>> searchGet(
108108
@QueryParam("queryType") QueryType queryType,
109109
@QueryParam(value = "scoringParameter", multipleQueryParams = true) List<String> scoringParameters,
110110
@QueryParam("scoringProfile") String scoringProfile,
111+
@QueryParam("semanticConfiguration") String semanticConfiguration,
111112
@QueryParam("searchFields") String searchFields,
112113
@QueryParam("queryLanguage") QueryLanguage queryLanguage,
113114
@QueryParam("speller") QuerySpellerType speller,
@@ -328,6 +329,11 @@ public Mono<Response<SearchDocumentsResult>> searchGetWithResponseAsync(
328329
scoringProfileInternal = searchOptions.getScoringProfile();
329330
}
330331
String scoringProfile = scoringProfileInternal;
332+
String semanticConfigurationInternal = null;
333+
if (searchOptions != null) {
334+
semanticConfigurationInternal = searchOptions.getSemanticConfiguration();
335+
}
336+
String semanticConfiguration = semanticConfigurationInternal;
331337
List<String> searchFieldsInternal = null;
332338
if (searchOptions != null) {
333339
searchFieldsInternal = searchOptions.getSearchFields();
@@ -430,6 +436,7 @@ public Mono<Response<SearchDocumentsResult>> searchGetWithResponseAsync(
430436
queryType,
431437
scoringParametersConverted,
432438
scoringProfile,
439+
semanticConfiguration,
433440
searchFieldsConverted,
434441
queryLanguage,
435442
speller,

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public static SearchIndex map(com.azure.search.documents.indexes.implementation.
4949
searchIndex.setCorsOptions(obj.getCorsOptions());
5050
searchIndex.setETag(obj.getETag());
5151
searchIndex.setScoringProfiles(obj.getScoringProfiles());
52+
searchIndex.setSemanticSettings(obj.getSemanticSettings());
5253

5354
return searchIndex;
5455
}
@@ -89,6 +90,7 @@ public static com.azure.search.documents.indexes.implementation.models.SearchInd
8990
searchIndex.setCorsOptions(obj.getCorsOptions());
9091
searchIndex.setETag(obj.getETag());
9192
searchIndex.setScoringProfiles(obj.getScoringProfiles());
93+
searchIndex.setSemanticSettings(obj.getSemanticSettings());
9294

9395
return searchIndex;
9496
}

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

Lines changed: 0 additions & 36 deletions
This file was deleted.

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,13 @@ public final class SearchOptions {
109109
@JsonProperty(value = "scoringProfile")
110110
private String scoringProfile;
111111

112+
/*
113+
* The name of the semantic configuration that lists which fields should be
114+
* used for semantic ranking, captions, highlights, and answers
115+
*/
116+
@JsonProperty(value = "semanticConfiguration")
117+
private String semanticConfiguration;
118+
112119
/*
113120
* The list of field names to which to scope the full-text search. When
114121
* using fielded search (fieldName:searchExpression) in a full Lucene
@@ -463,6 +470,28 @@ public SearchOptions setScoringProfile(String scoringProfile) {
463470
return this;
464471
}
465472

473+
/**
474+
* Get the semanticConfiguration property: The name of the semantic configuration that lists which fields should be
475+
* used for semantic ranking, captions, highlights, and answers.
476+
*
477+
* @return the semanticConfiguration value.
478+
*/
479+
public String getSemanticConfiguration() {
480+
return this.semanticConfiguration;
481+
}
482+
483+
/**
484+
* Set the semanticConfiguration property: The name of the semantic configuration that lists which fields should be
485+
* used for semantic ranking, captions, highlights, and answers.
486+
*
487+
* @param semanticConfiguration the semanticConfiguration value to set.
488+
* @return the SearchOptions object itself.
489+
*/
490+
public SearchOptions setSemanticConfiguration(String semanticConfiguration) {
491+
this.semanticConfiguration = semanticConfiguration;
492+
return this;
493+
}
494+
466495
/**
467496
* Get the searchFields property: The list of field names to which to scope the full-text search. When using fielded
468497
* search (fieldName:searchExpression) in a full Lucene query, the field names of each fielded search expression

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,13 @@ public final class SearchRequest {
131131
@JsonProperty(value = "scoringProfile")
132132
private String scoringProfile;
133133

134+
/*
135+
* The name of a semantic configuration that will be used when processing
136+
* documents for queries of type semantic.
137+
*/
138+
@JsonProperty(value = "semanticConfiguration")
139+
private String semanticConfiguration;
140+
134141
/*
135142
* A full-text search query expression; Use "*" or omit this parameter to
136143
* match all documents.
@@ -527,6 +534,28 @@ public SearchRequest setScoringProfile(String scoringProfile) {
527534
return this;
528535
}
529536

537+
/**
538+
* Get the semanticConfiguration property: The name of a semantic configuration that will be used when processing
539+
* documents for queries of type semantic.
540+
*
541+
* @return the semanticConfiguration value.
542+
*/
543+
public String getSemanticConfiguration() {
544+
return this.semanticConfiguration;
545+
}
546+
547+
/**
548+
* Set the semanticConfiguration property: The name of a semantic configuration that will be used when processing
549+
* documents for queries of type semantic.
550+
*
551+
* @param semanticConfiguration the semanticConfiguration value to set.
552+
* @return the SearchRequest object itself.
553+
*/
554+
public SearchRequest setSemanticConfiguration(String semanticConfiguration) {
555+
this.semanticConfiguration = semanticConfiguration;
556+
return this;
557+
}
558+
530559
/**
531560
* Get the searchText property: A full-text search query expression; Use "*" or omit this parameter to match all
532561
* documents.

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

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import com.azure.search.documents.indexes.models.SearchField;
1717
import com.azure.search.documents.indexes.models.SearchResourceEncryptionKey;
1818
import com.azure.search.documents.indexes.models.SearchSuggester;
19+
import com.azure.search.documents.indexes.models.SemanticSettings;
1920
import com.azure.search.documents.indexes.models.SimilarityAlgorithm;
2021
import com.fasterxml.jackson.annotation.JsonProperty;
2122
import java.util.List;
@@ -115,6 +116,13 @@ public final class SearchIndex {
115116
@JsonProperty(value = "similarity")
116117
private SimilarityAlgorithm similarity;
117118

119+
/*
120+
* Defines parameters for a search index that influence semantic
121+
* capabilities.
122+
*/
123+
@JsonProperty(value = "semantic")
124+
private SemanticSettings semanticSettings;
125+
118126
/*
119127
* The ETag of the index.
120128
*/
@@ -401,6 +409,26 @@ public SearchIndex setSimilarity(SimilarityAlgorithm similarity) {
401409
return this;
402410
}
403411

412+
/**
413+
* Get the semanticSettings property: Defines parameters for a search index that influence semantic capabilities.
414+
*
415+
* @return the semanticSettings value.
416+
*/
417+
public SemanticSettings getSemanticSettings() {
418+
return this.semanticSettings;
419+
}
420+
421+
/**
422+
* Set the semanticSettings property: Defines parameters for a search index that influence semantic capabilities.
423+
*
424+
* @param semanticSettings the semanticSettings value to set.
425+
* @return the SearchIndex object itself.
426+
*/
427+
public SearchIndex setSemanticSettings(SemanticSettings semanticSettings) {
428+
this.semanticSettings = semanticSettings;
429+
return this;
430+
}
431+
404432
/**
405433
* Get the eTag property: The ETag of the index.
406434
*
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
//
4+
// Code generated by Microsoft (R) AutoRest Code Generator.
5+
// Changes may cause incorrect behavior and will be lost if the code is
6+
// regenerated.
7+
8+
package com.azure.search.documents.indexes.models;
9+
10+
import com.azure.core.annotation.Fluent;
11+
import com.fasterxml.jackson.annotation.JsonProperty;
12+
import java.util.List;
13+
14+
/**
15+
* Describes the title, content, and keywords fields to be used for semantic ranking, captions, highlights, and answers.
16+
*/
17+
@Fluent
18+
public final class PrioritizedFields {
19+
/*
20+
* Defines the title field to be used for semantic ranking, captions,
21+
* highlights, and answers. If you don't have a title field in your index,
22+
* leave this blank.
23+
*/
24+
@JsonProperty(value = "titleField")
25+
private SemanticField titleField;
26+
27+
/*
28+
* Defines the content fields to be used for semantic ranking, captions,
29+
* highlights, and answers. For the best result, the selected fields should
30+
* contain text in natural language form. The order of the fields in the
31+
* array represents their priority. Fields with lower priority may get
32+
* truncated if the content is long.
33+
*/
34+
@JsonProperty(value = "prioritizedContentFields")
35+
private List<SemanticField> prioritizedContentFields;
36+
37+
/*
38+
* Defines the keyword fields to be used for semantic ranking, captions,
39+
* highlights, and answers. For the best result, the selected fields should
40+
* contain a list of keywords. The order of the fields in the array
41+
* represents their priority. Fields with lower priority may get truncated
42+
* if the content is long.
43+
*/
44+
@JsonProperty(value = "prioritizedKeywordsFields")
45+
private List<SemanticField> prioritizedKeywordsFields;
46+
47+
/**
48+
* Get the titleField property: Defines the title field to be used for semantic ranking, captions, highlights, and
49+
* answers. If you don't have a title field in your index, leave this blank.
50+
*
51+
* @return the titleField value.
52+
*/
53+
public SemanticField getTitleField() {
54+
return this.titleField;
55+
}
56+
57+
/**
58+
* Set the titleField property: Defines the title field to be used for semantic ranking, captions, highlights, and
59+
* answers. If you don't have a title field in your index, leave this blank.
60+
*
61+
* @param titleField the titleField value to set.
62+
* @return the PrioritizedFields object itself.
63+
*/
64+
public PrioritizedFields setTitleField(SemanticField titleField) {
65+
this.titleField = titleField;
66+
return this;
67+
}
68+
69+
/**
70+
* Get the prioritizedContentFields property: Defines the content fields to be used for semantic ranking, captions,
71+
* highlights, and answers. For the best result, the selected fields should contain text in natural language form.
72+
* The order of the fields in the array represents their priority. Fields with lower priority may get truncated if
73+
* the content is long.
74+
*
75+
* @return the prioritizedContentFields value.
76+
*/
77+
public List<SemanticField> getPrioritizedContentFields() {
78+
return this.prioritizedContentFields;
79+
}
80+
81+
/**
82+
* Set the prioritizedContentFields property: Defines the content fields to be used for semantic ranking, captions,
83+
* highlights, and answers. For the best result, the selected fields should contain text in natural language form.
84+
* The order of the fields in the array represents their priority. Fields with lower priority may get truncated if
85+
* the content is long.
86+
*
87+
* @param prioritizedContentFields the prioritizedContentFields value to set.
88+
* @return the PrioritizedFields object itself.
89+
*/
90+
public PrioritizedFields setPrioritizedContentFields(List<SemanticField> prioritizedContentFields) {
91+
this.prioritizedContentFields = prioritizedContentFields;
92+
return this;
93+
}
94+
95+
/**
96+
* Get the prioritizedKeywordsFields property: Defines the keyword fields to be used for semantic ranking, captions,
97+
* highlights, and answers. For the best result, the selected fields should contain a list of keywords. The order of
98+
* the fields in the array represents their priority. Fields with lower priority may get truncated if the content is
99+
* long.
100+
*
101+
* @return the prioritizedKeywordsFields value.
102+
*/
103+
public List<SemanticField> getPrioritizedKeywordsFields() {
104+
return this.prioritizedKeywordsFields;
105+
}
106+
107+
/**
108+
* Set the prioritizedKeywordsFields property: Defines the keyword fields to be used for semantic ranking, captions,
109+
* highlights, and answers. For the best result, the selected fields should contain a list of keywords. The order of
110+
* the fields in the array represents their priority. Fields with lower priority may get truncated if the content is
111+
* long.
112+
*
113+
* @param prioritizedKeywordsFields the prioritizedKeywordsFields value to set.
114+
* @return the PrioritizedFields object itself.
115+
*/
116+
public PrioritizedFields setPrioritizedKeywordsFields(List<SemanticField> prioritizedKeywordsFields) {
117+
this.prioritizedKeywordsFields = prioritizedKeywordsFields;
118+
return this;
119+
}
120+
}

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

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,13 @@ public final class SearchIndex {
109109
@JsonProperty(value = "similarity")
110110
private SimilarityAlgorithm similarity;
111111

112+
/*
113+
* Defines parameters for a search index that influence semantic
114+
* capabilities.
115+
*/
116+
@JsonProperty(value = "semantic")
117+
private SemanticSettings semanticSettings;
118+
112119
/*
113120
* The ETag of the index.
114121
*/
@@ -518,6 +525,26 @@ public SearchIndex setSimilarity(SimilarityAlgorithm similarity) {
518525
return this;
519526
}
520527

528+
/**
529+
* Get the semanticSettings property: Defines parameters for a search index that influence semantic capabilities.
530+
*
531+
* @return the semanticSettings value.
532+
*/
533+
public SemanticSettings getSemanticSettings() {
534+
return this.semanticSettings;
535+
}
536+
537+
/**
538+
* Set the semanticSettings property: Defines parameters for a search index that influence semantic capabilities.
539+
*
540+
* @param semanticSettings the semanticSettings value to set.
541+
* @return the SearchIndex object itself.
542+
*/
543+
public SearchIndex setSemanticSettings(SemanticSettings semanticSettings) {
544+
this.semanticSettings = semanticSettings;
545+
return this;
546+
}
547+
521548
/**
522549
* Get the eTag property: The ETag of the index.
523550
*

0 commit comments

Comments
 (0)