Release 11.3.0-beta.5 of search-documents SDK (#18583)
* Release 11.3.0-beta.5 of search-documents SDK * Rename fieldName
This commit is contained in:
Родитель
c1df214a8e
Коммит
6f833a8708
|
@ -2,6 +2,12 @@
|
|||
|
||||
## 11.3.0-beta.5 (2021-11-09)
|
||||
|
||||
### Features Added
|
||||
|
||||
- Added `semanticConfiguration` property to `SearchRequest` object.
|
||||
- Several new languages are added to the `KnownQueryLanguage` object.
|
||||
- Added `semanticSettings` property to `SearchIndex` object.
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
- Renamed `IndexerCurrentState` property to `IndexerState` property.
|
||||
|
@ -16,6 +22,8 @@
|
|||
|
||||
- Fixed the issue with the presence of recursive structure while uploading documents. Please refer [#15656](https://github.com/Azure/azure-sdk-for-js/issues/15656) for further details.
|
||||
|
||||
## 11.3.0-beta.4 (2021-10-05)
|
||||
|
||||
### Features Added
|
||||
|
||||
- Added properties `currentState` & `statusDetail` to the `IndexerExecutionResult` object.
|
||||
|
|
|
@ -1164,8 +1164,78 @@ export enum KnownQueryCaptionType {
|
|||
|
||||
// @public
|
||||
export enum KnownQueryLanguage {
|
||||
ArEg = "ar-eg",
|
||||
ArJo = "ar-jo",
|
||||
ArKw = "ar-kw",
|
||||
ArMa = "ar-ma",
|
||||
ArSa = "ar-sa",
|
||||
BgBg = "bg-bg",
|
||||
BnIn = "bn-in",
|
||||
CaEs = "ca-es",
|
||||
CsCz = "cs-cz",
|
||||
DaDk = "da-dk",
|
||||
DeDe = "de-de",
|
||||
ElGr = "el-gr",
|
||||
EnAu = "en-au",
|
||||
EnCa = "en-ca",
|
||||
EnGb = "en-gb",
|
||||
EnIn = "en-in",
|
||||
EnUs = "en-us",
|
||||
None = "none"
|
||||
EsEs = "es-es",
|
||||
EsMx = "es-mx",
|
||||
EtEe = "et-ee",
|
||||
EuEs = "eu-es",
|
||||
FaAe = "fa-ae",
|
||||
FiFi = "fi-fi",
|
||||
FrCa = "fr-ca",
|
||||
FrFr = "fr-fr",
|
||||
GaIe = "ga-ie",
|
||||
GlEs = "gl-es",
|
||||
GuIn = "gu-in",
|
||||
HeIl = "he-il",
|
||||
HiIn = "hi-in",
|
||||
HrBa = "hr-ba",
|
||||
HrHr = "hr-hr",
|
||||
HuHu = "hu-hu",
|
||||
HyAm = "hy-am",
|
||||
IdId = "id-id",
|
||||
IsIs = "is-is",
|
||||
ItIt = "it-it",
|
||||
JaJp = "ja-jp",
|
||||
KnIn = "kn-in",
|
||||
KoKr = "ko-kr",
|
||||
LtLt = "lt-lt",
|
||||
LvLv = "lv-lv",
|
||||
MlIn = "ml-in",
|
||||
MrIn = "mr-in",
|
||||
MsBn = "ms-bn",
|
||||
MsMy = "ms-my",
|
||||
NbNo = "nb-no",
|
||||
NlBe = "nl-be",
|
||||
NlNl = "nl-nl",
|
||||
None = "none",
|
||||
NoNo = "no-no",
|
||||
PaIn = "pa-in",
|
||||
PlPl = "pl-pl",
|
||||
PtBr = "pt-br",
|
||||
PtPt = "pt-pt",
|
||||
RoRo = "ro-ro",
|
||||
RuRu = "ru-ru",
|
||||
SkSk = "sk-sk",
|
||||
SlSl = "sl-sl",
|
||||
SrBa = "sr-ba",
|
||||
SrMe = "sr-me",
|
||||
SrRs = "sr-rs",
|
||||
SvSe = "sv-se",
|
||||
TaIn = "ta-in",
|
||||
TeIn = "te-in",
|
||||
ThTh = "th-th",
|
||||
TrTr = "tr-tr",
|
||||
UkUa = "uk-ua",
|
||||
UrPk = "ur-pk",
|
||||
ViVn = "vi-vn",
|
||||
ZhCn = "zh-cn",
|
||||
ZhTw = "zh-tw"
|
||||
}
|
||||
|
||||
// @public
|
||||
|
@ -1658,6 +1728,13 @@ export type PIIDetectionSkill = BaseSearchIndexerSkill & {
|
|||
// @public
|
||||
export type PIIDetectionSkillMaskingMode = string;
|
||||
|
||||
// @public
|
||||
export interface PrioritizedFields {
|
||||
prioritizedContentFields?: SemanticField[];
|
||||
prioritizedKeywordsFields?: SemanticField[];
|
||||
titleField?: SemanticField;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type QueryAnswerType = string;
|
||||
|
||||
|
@ -1783,6 +1860,7 @@ export interface SearchIndex {
|
|||
name: string;
|
||||
normalizers?: LexicalNormalizer[];
|
||||
scoringProfiles?: ScoringProfile[];
|
||||
semanticSettings?: SemanticSettings;
|
||||
similarity?: SimilarityAlgorithm;
|
||||
suggesters?: SearchSuggester[];
|
||||
tokenFilters?: TokenFilter[];
|
||||
|
@ -2084,6 +2162,7 @@ export interface SearchRequest {
|
|||
searchMode?: SearchMode;
|
||||
searchText?: string;
|
||||
select?: string;
|
||||
semanticConfiguration?: string;
|
||||
semanticFields?: string;
|
||||
sessionId?: string;
|
||||
skip?: number;
|
||||
|
@ -2152,6 +2231,23 @@ export interface SearchSuggester {
|
|||
sourceFields: string[];
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface SemanticConfiguration {
|
||||
name: string;
|
||||
prioritizedFields: PrioritizedFields;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface SemanticField {
|
||||
// (undocumented)
|
||||
name?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface SemanticSettings {
|
||||
configurations?: SemanticConfiguration[];
|
||||
}
|
||||
|
||||
// @public
|
||||
export type SentimentSkill = BaseSearchIndexerSkill & {
|
||||
odatatype: "#Microsoft.Skills.Text.SentimentSkill";
|
||||
|
|
|
@ -131,6 +131,8 @@ export interface SearchRequest {
|
|||
scoringParameters?: string[];
|
||||
/** The name of a scoring profile to evaluate match scores for matching documents in order to sort the results. */
|
||||
scoringProfile?: string;
|
||||
/** The name of a semantic configuration that will be used when processing documents for queries of type semantic. */
|
||||
semanticConfiguration?: string;
|
||||
/** A full-text search query expression; Use "*" or omit this parameter to match all documents. */
|
||||
searchText?: string;
|
||||
/** The comma-separated list of field names to which to scope the full-text search. When using fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each fielded search expression take precedence over any field names listed in this parameter. */
|
||||
|
@ -377,6 +379,8 @@ export interface SearchOptions {
|
|||
scoringParameters?: string[];
|
||||
/** The name of a scoring profile to evaluate match scores for matching documents in order to sort the results. */
|
||||
scoringProfile?: string;
|
||||
/** The name of the semantic configuration that lists which fields should be used for semantic ranking, captions, highlights, and answers */
|
||||
semanticConfiguration?: string;
|
||||
/** The list of field names to which to scope the full-text search. When using fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each fielded search expression take precedence over any field names listed in this parameter. */
|
||||
searchFields?: string[];
|
||||
/** The language of the query. */
|
||||
|
@ -464,8 +468,148 @@ export type ApiVersion20210430Preview = string;
|
|||
export enum KnownQueryLanguage {
|
||||
/** Query language not specified. */
|
||||
None = "none",
|
||||
/** English */
|
||||
EnUs = "en-us"
|
||||
/** Query language value for English (United States). */
|
||||
EnUs = "en-us",
|
||||
/** Query language value for English (Great Britain). */
|
||||
EnGb = "en-gb",
|
||||
/** Query language value for English (India). */
|
||||
EnIn = "en-in",
|
||||
/** Query language value for English (Canada). */
|
||||
EnCa = "en-ca",
|
||||
/** Query language value for English (Australia). */
|
||||
EnAu = "en-au",
|
||||
/** Query language value for French (France). */
|
||||
FrFr = "fr-fr",
|
||||
/** Query language value for French (Canada). */
|
||||
FrCa = "fr-ca",
|
||||
/** Query language value for German (Germany). */
|
||||
DeDe = "de-de",
|
||||
/** Query language value for Spanish (Spain). */
|
||||
EsEs = "es-es",
|
||||
/** Query language value for Spanish (Mexico). */
|
||||
EsMx = "es-mx",
|
||||
/** Query language value for Chinese (China). */
|
||||
ZhCn = "zh-cn",
|
||||
/** Query language value for Chinese (Taiwan). */
|
||||
ZhTw = "zh-tw",
|
||||
/** Query language value for Portuguese (Brazil). */
|
||||
PtBr = "pt-br",
|
||||
/** Query language value for Portuguese (Portugal). */
|
||||
PtPt = "pt-pt",
|
||||
/** Query language value for Italian (Italy). */
|
||||
ItIt = "it-it",
|
||||
/** Query language value for Japanese (Japan). */
|
||||
JaJp = "ja-jp",
|
||||
/** Query language value for Korean (Korea). */
|
||||
KoKr = "ko-kr",
|
||||
/** Query language value for Russian (Russia). */
|
||||
RuRu = "ru-ru",
|
||||
/** Query language value for Czech (Czech Republic). */
|
||||
CsCz = "cs-cz",
|
||||
/** Query language value for Dutch (Belgium). */
|
||||
NlBe = "nl-be",
|
||||
/** Query language value for Dutch (Netherlands). */
|
||||
NlNl = "nl-nl",
|
||||
/** Query language value for Hungarian (Hungary). */
|
||||
HuHu = "hu-hu",
|
||||
/** Query language value for Polish (Poland). */
|
||||
PlPl = "pl-pl",
|
||||
/** Query language value for Swedish (Sweden). */
|
||||
SvSe = "sv-se",
|
||||
/** Query language value for Turkish (Turkey). */
|
||||
TrTr = "tr-tr",
|
||||
/** Query language value for Hindi (India). */
|
||||
HiIn = "hi-in",
|
||||
/** Query language value for Arabic (Saudi Arabia). */
|
||||
ArSa = "ar-sa",
|
||||
/** Query language value for Arabic (Egypt). */
|
||||
ArEg = "ar-eg",
|
||||
/** Query language value for Arabic (Morocco). */
|
||||
ArMa = "ar-ma",
|
||||
/** Query language value for Arabic (Kuwait). */
|
||||
ArKw = "ar-kw",
|
||||
/** Query language value for Arabic (Jordan). */
|
||||
ArJo = "ar-jo",
|
||||
/** Query language value for Danish (Denmark). */
|
||||
DaDk = "da-dk",
|
||||
/** Query language value for Norwegian (Normway). */
|
||||
NoNo = "no-no",
|
||||
/** Query language value for Bulgarian (Bulgary). */
|
||||
BgBg = "bg-bg",
|
||||
/** Query language value for Croatian (Croatia). */
|
||||
HrHr = "hr-hr",
|
||||
/** Query language value for Croatian (Bosnia and Herzegovina). */
|
||||
HrBa = "hr-ba",
|
||||
/** Query language value for Malay (Malaysia). */
|
||||
MsMy = "ms-my",
|
||||
/** Query language value for Malay (Brunei Darussalam). */
|
||||
MsBn = "ms-bn",
|
||||
/** Query language value for Slovenian (Slovenia). */
|
||||
SlSl = "sl-sl",
|
||||
/** Query language value for Tamil (India). */
|
||||
TaIn = "ta-in",
|
||||
/** Query language value for Vietnamese (Viet Nam). */
|
||||
ViVn = "vi-vn",
|
||||
/** Query language value for Greek (Greece). */
|
||||
ElGr = "el-gr",
|
||||
/** Query language value for Romanian (Romania). */
|
||||
RoRo = "ro-ro",
|
||||
/** Query language value for Icelandic (Iceland). */
|
||||
IsIs = "is-is",
|
||||
/** Query language value for Indonesian (Indonesia). */
|
||||
IdId = "id-id",
|
||||
/** Query language value for Thai (Thailand). */
|
||||
ThTh = "th-th",
|
||||
/** Query language value for Lithuanian (Lithuania). */
|
||||
LtLt = "lt-lt",
|
||||
/** Query language value for Ukrainian (Ukraine). */
|
||||
UkUa = "uk-ua",
|
||||
/** Query language value for Latvian (Latvia). */
|
||||
LvLv = "lv-lv",
|
||||
/** Query language value for Estonian (Estonia). */
|
||||
EtEe = "et-ee",
|
||||
/** Query language value for Catalan (Spain). */
|
||||
CaEs = "ca-es",
|
||||
/** Query language value for Finnish (Finland). */
|
||||
FiFi = "fi-fi",
|
||||
/** Query language value for Serbian (Bosnia and Herzegovina). */
|
||||
SrBa = "sr-ba",
|
||||
/** Query language value for Serbian (Montenegro). */
|
||||
SrMe = "sr-me",
|
||||
/** Query language value for Serbian (Serbia). */
|
||||
SrRs = "sr-rs",
|
||||
/** Query language value for Slovak (Slovakia). */
|
||||
SkSk = "sk-sk",
|
||||
/** Query language value for Norwegian (Norway). */
|
||||
NbNo = "nb-no",
|
||||
/** Query language value for Armenian (Armenia). */
|
||||
HyAm = "hy-am",
|
||||
/** Query language value for Bengali (India). */
|
||||
BnIn = "bn-in",
|
||||
/** Query language value for Basque (Spain). */
|
||||
EuEs = "eu-es",
|
||||
/** Query language value for Galician (Spain). */
|
||||
GlEs = "gl-es",
|
||||
/** Query language value for Gujarati (India). */
|
||||
GuIn = "gu-in",
|
||||
/** Query language value for Hebrew (Israel). */
|
||||
HeIl = "he-il",
|
||||
/** Query language value for Irish (Ireland). */
|
||||
GaIe = "ga-ie",
|
||||
/** Query language value for Kannada (India). */
|
||||
KnIn = "kn-in",
|
||||
/** Query language value for Malayalam (India). */
|
||||
MlIn = "ml-in",
|
||||
/** Query language value for Marathi (India). */
|
||||
MrIn = "mr-in",
|
||||
/** Query language value for Persian (U.A.E.). */
|
||||
FaAe = "fa-ae",
|
||||
/** Query language value for Punjabi (India). */
|
||||
PaIn = "pa-in",
|
||||
/** Query language value for Telugu (India). */
|
||||
TeIn = "te-in",
|
||||
/** Query language value for Urdu (Pakistan). */
|
||||
UrPk = "ur-pk"
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -474,7 +618,77 @@ export enum KnownQueryLanguage {
|
|||
* this enum contains the known values that the service supports.
|
||||
* ### Known values supported by the service
|
||||
* **none**: Query language not specified. \
|
||||
* **en-us**: English
|
||||
* **en-us**: Query language value for English (United States). \
|
||||
* **en-gb**: Query language value for English (Great Britain). \
|
||||
* **en-in**: Query language value for English (India). \
|
||||
* **en-ca**: Query language value for English (Canada). \
|
||||
* **en-au**: Query language value for English (Australia). \
|
||||
* **fr-fr**: Query language value for French (France). \
|
||||
* **fr-ca**: Query language value for French (Canada). \
|
||||
* **de-de**: Query language value for German (Germany). \
|
||||
* **es-es**: Query language value for Spanish (Spain). \
|
||||
* **es-mx**: Query language value for Spanish (Mexico). \
|
||||
* **zh-cn**: Query language value for Chinese (China). \
|
||||
* **zh-tw**: Query language value for Chinese (Taiwan). \
|
||||
* **pt-br**: Query language value for Portuguese (Brazil). \
|
||||
* **pt-pt**: Query language value for Portuguese (Portugal). \
|
||||
* **it-it**: Query language value for Italian (Italy). \
|
||||
* **ja-jp**: Query language value for Japanese (Japan). \
|
||||
* **ko-kr**: Query language value for Korean (Korea). \
|
||||
* **ru-ru**: Query language value for Russian (Russia). \
|
||||
* **cs-cz**: Query language value for Czech (Czech Republic). \
|
||||
* **nl-be**: Query language value for Dutch (Belgium). \
|
||||
* **nl-nl**: Query language value for Dutch (Netherlands). \
|
||||
* **hu-hu**: Query language value for Hungarian (Hungary). \
|
||||
* **pl-pl**: Query language value for Polish (Poland). \
|
||||
* **sv-se**: Query language value for Swedish (Sweden). \
|
||||
* **tr-tr**: Query language value for Turkish (Turkey). \
|
||||
* **hi-in**: Query language value for Hindi (India). \
|
||||
* **ar-sa**: Query language value for Arabic (Saudi Arabia). \
|
||||
* **ar-eg**: Query language value for Arabic (Egypt). \
|
||||
* **ar-ma**: Query language value for Arabic (Morocco). \
|
||||
* **ar-kw**: Query language value for Arabic (Kuwait). \
|
||||
* **ar-jo**: Query language value for Arabic (Jordan). \
|
||||
* **da-dk**: Query language value for Danish (Denmark). \
|
||||
* **no-no**: Query language value for Norwegian (Normway). \
|
||||
* **bg-bg**: Query language value for Bulgarian (Bulgary). \
|
||||
* **hr-hr**: Query language value for Croatian (Croatia). \
|
||||
* **hr-ba**: Query language value for Croatian (Bosnia and Herzegovina). \
|
||||
* **ms-my**: Query language value for Malay (Malaysia). \
|
||||
* **ms-bn**: Query language value for Malay (Brunei Darussalam). \
|
||||
* **sl-sl**: Query language value for Slovenian (Slovenia). \
|
||||
* **ta-in**: Query language value for Tamil (India). \
|
||||
* **vi-vn**: Query language value for Vietnamese (Viet Nam). \
|
||||
* **el-gr**: Query language value for Greek (Greece). \
|
||||
* **ro-ro**: Query language value for Romanian (Romania). \
|
||||
* **is-is**: Query language value for Icelandic (Iceland). \
|
||||
* **id-id**: Query language value for Indonesian (Indonesia). \
|
||||
* **th-th**: Query language value for Thai (Thailand). \
|
||||
* **lt-lt**: Query language value for Lithuanian (Lithuania). \
|
||||
* **uk-ua**: Query language value for Ukrainian (Ukraine). \
|
||||
* **lv-lv**: Query language value for Latvian (Latvia). \
|
||||
* **et-ee**: Query language value for Estonian (Estonia). \
|
||||
* **ca-es**: Query language value for Catalan (Spain). \
|
||||
* **fi-fi**: Query language value for Finnish (Finland). \
|
||||
* **sr-ba**: Query language value for Serbian (Bosnia and Herzegovina). \
|
||||
* **sr-me**: Query language value for Serbian (Montenegro). \
|
||||
* **sr-rs**: Query language value for Serbian (Serbia). \
|
||||
* **sk-sk**: Query language value for Slovak (Slovakia). \
|
||||
* **nb-no**: Query language value for Norwegian (Norway). \
|
||||
* **hy-am**: Query language value for Armenian (Armenia). \
|
||||
* **bn-in**: Query language value for Bengali (India). \
|
||||
* **eu-es**: Query language value for Basque (Spain). \
|
||||
* **gl-es**: Query language value for Galician (Spain). \
|
||||
* **gu-in**: Query language value for Gujarati (India). \
|
||||
* **he-il**: Query language value for Hebrew (Israel). \
|
||||
* **ga-ie**: Query language value for Irish (Ireland). \
|
||||
* **kn-in**: Query language value for Kannada (India). \
|
||||
* **ml-in**: Query language value for Malayalam (India). \
|
||||
* **mr-in**: Query language value for Marathi (India). \
|
||||
* **fa-ae**: Query language value for Persian (U.A.E.). \
|
||||
* **pa-in**: Query language value for Punjabi (India). \
|
||||
* **te-in**: Query language value for Telugu (India). \
|
||||
* **ur-pk**: Query language value for Urdu (Pakistan).
|
||||
*/
|
||||
export type QueryLanguage = string;
|
||||
|
||||
|
|
|
@ -277,6 +277,12 @@ export const SearchRequest: coreClient.CompositeMapper = {
|
|||
name: "String"
|
||||
}
|
||||
},
|
||||
semanticConfiguration: {
|
||||
serializedName: "semanticConfiguration",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
searchText: {
|
||||
serializedName: "search",
|
||||
type: {
|
||||
|
|
|
@ -219,6 +219,16 @@ export const scoringProfile: OperationQueryParameter = {
|
|||
}
|
||||
};
|
||||
|
||||
export const semanticConfiguration: OperationQueryParameter = {
|
||||
parameterPath: ["options", "searchOptions", "semanticConfiguration"],
|
||||
mapper: {
|
||||
serializedName: "semanticConfiguration",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const searchFields: OperationQueryParameter = {
|
||||
parameterPath: ["options", "searchOptions", "searchFields"],
|
||||
mapper: {
|
||||
|
|
|
@ -224,6 +224,7 @@ const searchGetOperationSpec: coreClient.OperationSpec = {
|
|||
Parameters.queryType,
|
||||
Parameters.scoringParameters,
|
||||
Parameters.scoringProfile,
|
||||
Parameters.semanticConfiguration,
|
||||
Parameters.searchFields,
|
||||
Parameters.queryLanguage,
|
||||
Parameters.speller,
|
||||
|
|
|
@ -49,7 +49,7 @@ export class SearchClientContext extends coreClient.ServiceClient {
|
|||
requestContentType: "application/json; charset=utf-8"
|
||||
};
|
||||
|
||||
const packageDetails = `azsdk-js-search-documents/11.3.0-beta.4`;
|
||||
const packageDetails = `azsdk-js-search-documents/11.3.0-beta.5`;
|
||||
const userAgentPrefix =
|
||||
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
||||
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
||||
|
|
|
@ -729,6 +729,8 @@ export interface SearchIndex {
|
|||
encryptionKey?: SearchResourceEncryptionKey;
|
||||
/** The type of similarity algorithm to be used when scoring and ranking the documents matching a search query. The similarity algorithm can only be defined at index creation time and cannot be modified on existing indexes. If null, the ClassicSimilarity algorithm is used. */
|
||||
similarity?: SimilarityUnion;
|
||||
/** Defines parameters for a search index that influence semantic capabilities. */
|
||||
semanticSettings?: SemanticSettings;
|
||||
/** The ETag of the index. */
|
||||
etag?: string;
|
||||
}
|
||||
|
@ -904,6 +906,35 @@ export interface Similarity {
|
|||
| "#Microsoft.Azure.Search.BM25Similarity";
|
||||
}
|
||||
|
||||
/** Defines parameters for a search index that influence semantic capabilities. */
|
||||
export interface SemanticSettings {
|
||||
/** The semantic configurations for the index. */
|
||||
configurations?: SemanticConfiguration[];
|
||||
}
|
||||
|
||||
/** Defines a specific configuration to be used in the context of semantic capabilities. */
|
||||
export interface SemanticConfiguration {
|
||||
/** The name of the semantic configuration. */
|
||||
name: string;
|
||||
/** Describes the title, content, and keyword fields to be used for semantic ranking, captions, highlights, and answers. At least one of the three sub properties (titleField, prioritizedKeywordsFields and prioritizedContentFields) need to be set. */
|
||||
prioritizedFields: PrioritizedFields;
|
||||
}
|
||||
|
||||
/** Describes the title, content, and keywords fields to be used for semantic ranking, captions, highlights, and answers. */
|
||||
export interface PrioritizedFields {
|
||||
/** Defines the title field to be used for semantic ranking, captions, highlights, and answers. If you don't have a title field in your index, leave this blank. */
|
||||
titleField?: SemanticField;
|
||||
/** Defines the content fields to be used for semantic ranking, captions, highlights, and answers. For the best result, the selected fields should contain text in natural language form. The order of the fields in the array represents their priority. Fields with lower priority may get truncated if the content is long. */
|
||||
prioritizedContentFields?: SemanticField[];
|
||||
/** Defines the keyword fields to be used for semantic ranking, captions, highlights, and answers. For the best result, the selected fields should contain a list of keywords. The order of the fields in the array represents their priority. Fields with lower priority may get truncated if the content is long. */
|
||||
prioritizedKeywordsFields?: SemanticField[];
|
||||
}
|
||||
|
||||
/** A field that is used as part of the semantic configuration. */
|
||||
export interface SemanticField {
|
||||
name?: string;
|
||||
}
|
||||
|
||||
/** Response from a List Indexes request. If successful, it includes the full definitions of all indexes. */
|
||||
export interface ListIndexesResult {
|
||||
/**
|
||||
|
|
|
@ -1665,6 +1665,13 @@ export const SearchIndex: coreClient.CompositeMapper = {
|
|||
className: "Similarity"
|
||||
}
|
||||
},
|
||||
semanticSettings: {
|
||||
serializedName: "semantic",
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "SemanticSettings"
|
||||
}
|
||||
},
|
||||
etag: {
|
||||
serializedName: "@odata\\.etag",
|
||||
type: {
|
||||
|
@ -2117,6 +2124,105 @@ export const Similarity: coreClient.CompositeMapper = {
|
|||
}
|
||||
};
|
||||
|
||||
export const SemanticSettings: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "SemanticSettings",
|
||||
modelProperties: {
|
||||
configurations: {
|
||||
serializedName: "configurations",
|
||||
type: {
|
||||
name: "Sequence",
|
||||
element: {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "SemanticConfiguration"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const SemanticConfiguration: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "SemanticConfiguration",
|
||||
modelProperties: {
|
||||
name: {
|
||||
serializedName: "name",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
prioritizedFields: {
|
||||
serializedName: "prioritizedFields",
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "PrioritizedFields"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const PrioritizedFields: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "PrioritizedFields",
|
||||
modelProperties: {
|
||||
titleField: {
|
||||
serializedName: "titleField",
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "SemanticField"
|
||||
}
|
||||
},
|
||||
prioritizedContentFields: {
|
||||
serializedName: "prioritizedContentFields",
|
||||
type: {
|
||||
name: "Sequence",
|
||||
element: {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "SemanticField"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
prioritizedKeywordsFields: {
|
||||
serializedName: "prioritizedKeywordsFields",
|
||||
type: {
|
||||
name: "Sequence",
|
||||
element: {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "SemanticField"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const SemanticField: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "SemanticField",
|
||||
modelProperties: {
|
||||
name: {
|
||||
serializedName: "fieldName",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const ListIndexesResult: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
|
|
|
@ -325,7 +325,11 @@ export {
|
|||
IndexerExecutionStatusDetail,
|
||||
KnownIndexerExecutionStatusDetail,
|
||||
IndexingMode,
|
||||
KnownIndexingMode
|
||||
KnownIndexingMode,
|
||||
SemanticSettings,
|
||||
SemanticConfiguration,
|
||||
PrioritizedFields,
|
||||
SemanticField
|
||||
} from "./generated/service/models";
|
||||
export { AzureKeyCredential } from "@azure/core-auth";
|
||||
export { createSynonymMapFromFile } from "./synonymMapHelper";
|
||||
|
|
|
@ -247,6 +247,11 @@ export interface SearchRequest {
|
|||
* the results.
|
||||
*/
|
||||
scoringProfile?: string;
|
||||
/**
|
||||
* The name of a semantic configuration that will be used when processing documents for queries of
|
||||
* type semantic.
|
||||
*/
|
||||
semanticConfiguration?: string;
|
||||
/**
|
||||
* A full-text search query expression; Use "*" or omit this parameter to match all documents.
|
||||
*/
|
||||
|
|
|
@ -83,7 +83,8 @@ import {
|
|||
LexicalNormalizerName,
|
||||
CustomNormalizer,
|
||||
SearchIndexerKnowledgeStore,
|
||||
SearchIndexerCache
|
||||
SearchIndexerCache,
|
||||
SemanticSettings
|
||||
} from "./generated/service/models";
|
||||
|
||||
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
||||
|
@ -1008,6 +1009,10 @@ export interface SearchIndex {
|
|||
* be modified on existing indexes. If null, the ClassicSimilarity algorithm is used.
|
||||
*/
|
||||
similarity?: SimilarityAlgorithm;
|
||||
/**
|
||||
* Defines parameters for a search index that influence semantic capabilities.
|
||||
*/
|
||||
semanticSettings?: SemanticSettings;
|
||||
/**
|
||||
* The ETag of the index.
|
||||
*/
|
||||
|
|
|
@ -453,7 +453,8 @@ export function generatedIndexToPublicIndex(generatedIndex: GeneratedSearchIndex
|
|||
normalizers: generatedIndex.normalizers as LexicalNormalizer[],
|
||||
scoringProfiles: generatedIndex.scoringProfiles as ScoringProfile[],
|
||||
fields: convertFieldsToPublic(generatedIndex.fields),
|
||||
similarity: convertSimilarityToPublic(generatedIndex.similarity)
|
||||
similarity: convertSimilarityToPublic(generatedIndex.similarity),
|
||||
semanticSettings: generatedIndex.semanticSettings
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -518,7 +519,8 @@ export function publicIndexToGeneratedIndex(index: SearchIndex): GeneratedSearch
|
|||
analyzers: convertAnalyzersToGenerated(index.analyzers),
|
||||
tokenizers: convertTokenizersToGenerated(index.tokenizers),
|
||||
fields: convertFieldsToGenerated(index.fields),
|
||||
similarity: convertSimilarityToGenerated(index.similarity)
|
||||
similarity: convertSimilarityToGenerated(index.similarity),
|
||||
semanticSettings: index.semanticSettings
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ generate-metadata: false
|
|||
license-header: MICROSOFT_MIT_NO_VERSION
|
||||
output-folder: ../
|
||||
source-code-folder-path: ./src/generated/data
|
||||
input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/4e3ae66b8b25c53be84bb0c35c3d6d43291f7a40/specification/search/data-plane/Azure.Search/preview/2021-04-30-Preview/searchindex.json
|
||||
input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/7a003b0aa0def1a454ff0844fa4c6a276bc1ee53/specification/search/data-plane/Azure.Search/preview/2021-04-30-Preview/searchindex.json
|
||||
add-credentials: false
|
||||
title: SearchClient
|
||||
use-extension:
|
||||
|
|
|
@ -10,7 +10,7 @@ generate-metadata: false
|
|||
license-header: MICROSOFT_MIT_NO_VERSION
|
||||
output-folder: ../
|
||||
source-code-folder-path: ./src/generated/service
|
||||
input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/4e3ae66b8b25c53be84bb0c35c3d6d43291f7a40/specification/search/data-plane/Azure.Search/preview/2021-04-30-Preview/searchservice.json
|
||||
input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/7a003b0aa0def1a454ff0844fa4c6a276bc1ee53/specification/search/data-plane/Azure.Search/preview/2021-04-30-Preview/searchservice.json
|
||||
add-credentials: false
|
||||
use-extension:
|
||||
"@autorest/typescript": "6.0.0-beta.13"
|
||||
|
@ -331,3 +331,11 @@ directive:
|
|||
transform: >
|
||||
$["x-ms-client-name"] = "ResetDocumentsFinalChangeTrackingState";
|
||||
```
|
||||
|
||||
```yaml
|
||||
directive:
|
||||
from: swagger-document
|
||||
where: $.definitions.SemanticField.properties.fieldName
|
||||
transform: >
|
||||
$["x-ms-client-name"] = "name";
|
||||
```
|
||||
|
|
Загрузка…
Ссылка в новой задаче