diff --git a/specification/search/data-plane/Azure.Search/preview/2021-04-30-Preview/examples/SearchServiceCreateIndex.json b/specification/search/data-plane/Azure.Search/preview/2021-04-30-Preview/examples/SearchServiceCreateIndex.json index 8cc0a87c190f..cde4cc985baf 100644 --- a/specification/search/data-plane/Azure.Search/preview/2021-04-30-Preview/examples/SearchServiceCreateIndex.json +++ b/specification/search/data-plane/Azure.Search/preview/2021-04-30-Preview/examples/SearchServiceCreateIndex.json @@ -125,6 +125,34 @@ "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", "b": 0.5, "k1": 1.3 + }, + "semantic": { + "semanticConfigurations": [ + { + "name": "semanticHotels", + "prioritizedFields": { + "titleField": { + "fieldName": "hotelName" + }, + "prioritizedContentFields": [ + { + "fieldName": "description" + }, + { + "fieldName": "description_fr" + } + ], + "prioritizedKeywordsFields": [ + { + "fieldName": "tags" + }, + { + "fieldName": "category" + } + ] + } + } + ] } } }, @@ -366,8 +394,36 @@ "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", "b": 0.5, "k1": 1.3 + }, + "semantic": { + "semanticConfigurations": [ + { + "name": "semanticHotels", + "prioritizedFields": { + "titleField": { + "fieldName": "hotelName" + }, + "prioritizedContentFields": [ + { + "fieldName": "description" + }, + { + "fieldName": "description_fr" + } + ], + "prioritizedKeywordsFields": [ + { + "fieldName": "tags" + }, + { + "fieldName": "category" + } + ] + } + } + ] } } } } -} +} \ No newline at end of file diff --git a/specification/search/data-plane/Azure.Search/preview/2021-04-30-Preview/examples/SearchServiceCreateOrUpdateIndex.json b/specification/search/data-plane/Azure.Search/preview/2021-04-30-Preview/examples/SearchServiceCreateOrUpdateIndex.json index d47abe426fa7..072672593423 100644 --- a/specification/search/data-plane/Azure.Search/preview/2021-04-30-Preview/examples/SearchServiceCreateOrUpdateIndex.json +++ b/specification/search/data-plane/Azure.Search/preview/2021-04-30-Preview/examples/SearchServiceCreateOrUpdateIndex.json @@ -123,6 +123,34 @@ }, "similarity": { "@odata.type": "#Microsoft.Azure.Search.ClassicSimilarity" + }, + "semantic": { + "semanticConfigurations": [ + { + "name": "semanticHotels", + "prioritizedFields": { + "titleField": { + "fieldName": "hotelName" + }, + "prioritizedContentFields": [ + { + "fieldName": "description" + }, + { + "fieldName": "description_fr" + } + ], + "prioritizedKeywordsFields": [ + { + "fieldName": "tags" + }, + { + "fieldName": "category" + } + ] + } + } + ] } } }, @@ -591,6 +619,34 @@ "keyVaultKeyVersion": "myKeyVersion-32charAlphaNumericString", "keyVaultUri": "https://myKeyVault.vault.azure.net", "accessCredentials": null + }, + "semantic": { + "semanticConfigurations": [ + { + "name": "semanticHotels", + "prioritizedFields": { + "titleField": { + "fieldName": "hotelName" + }, + "prioritizedContentFields": [ + { + "fieldName": "description" + }, + { + "fieldName": "description_fr" + } + ], + "prioritizedKeywordsFields": [ + { + "fieldName": "tags" + }, + { + "fieldName": "category" + } + ] + } + } + ] } } } diff --git a/specification/search/data-plane/Azure.Search/preview/2021-04-30-Preview/searchindex.json b/specification/search/data-plane/Azure.Search/preview/2021-04-30-Preview/searchindex.json index 97bae8ac0308..01b937fc6513 100644 --- a/specification/search/data-plane/Azure.Search/preview/2021-04-30-Preview/searchindex.json +++ b/specification/search/data-plane/Azure.Search/preview/2021-04-30-Preview/searchindex.json @@ -239,6 +239,15 @@ "name": "SearchOptions" } }, + { + "name": "semanticConfiguration", + "in": "query", + "type": "string", + "description": "The name of the semantic configuration that lists which fields should be used for semantic ranking, captions, highlights, and answers", + "x-ms-parameter-grouping": { + "name": "SearchOptions" + } + }, { "name": "searchFields", "in": "query", @@ -1524,7 +1533,77 @@ "type": "string", "enum": [ "none", - "en-us" + "en-us", + "en-gb", + "en-in", + "en-ca", + "en-au", + "fr-fr", + "fr-ca", + "de-de", + "es-es", + "es-mx", + "zh-cn", + "zh-tw", + "pt-br", + "pt-pt", + "it-it", + "ja-jp", + "ko-kr", + "ru-ru", + "cs-cz", + "nl-be", + "nl-nl", + "hu-hu", + "pl-pl", + "sv-se", + "tr-tr", + "hi-in", + "ar-sa", + "ar-eg", + "ar-ma", + "ar-kw", + "ar-jo", + "da-dk", + "no-no", + "bg-bg", + "hr-hr", + "hr-ba", + "ms-my", + "ms-bn", + "sl-sl", + "ta-in", + "vi-vn", + "el-gr", + "ro-ro", + "is-is", + "id-id", + "th-th", + "lt-lt", + "uk-ua", + "lv-lv", + "et-ee", + "ca-es", + "fi-fi", + "sr-ba", + "sr-me", + "sr-rs", + "sk-sk", + "nb-no", + "hy-am", + "bn-in", + "eu-es", + "gl-es", + "gu-in", + "he-il", + "ga-ie", + "kn-in", + "ml-in", + "mr-in", + "fa-ae", + "pa-in", + "te-in", + "ur-pk" ], "x-ms-enum": { "name": "QueryLanguage", @@ -1538,7 +1617,357 @@ { "value": "en-us", "name": "EnUs", - "description": "English" + "description": "Query language value for en-us." + }, + { + "value": "en-gb", + "name":"EnGb", + "description": "Query language value for en-gb." + }, + { + "value": "en-in", + "name":"EnIn", + "description": "Query language value for en-in." + }, + { + "value": "en-ca", + "name":"EnCa", + "description": "Query language value for en-ca." + }, + { + "value": "en-au", + "name":"EnAu", + "description": "Query language value for en-au." + }, + { + "value": "fr-fr", + "name":"FrFr", + "description": "Query language value for fr-fr." + }, + { + "value": "fr-ca", + "name":"FrCa", + "description": "Query language value for fr-ca." + }, + { + "value": "de-de", + "name":"DeDe", + "description": "Query language value for de-de." + }, + { + "value": "es-es", + "name":"EsEs", + "description": "Query language value for es-es." + }, + { + "value": "es-mx", + "name":"EsMx", + "description": "Query language value for es-mx." + }, + { + "value": "zh-cn", + "name":"ZhCn", + "description": "Query language value for zh-cn." + }, + { + "value": "zh-tw", + "name":"ZhTw", + "description": "Query language value for zh-tw." + }, + { + "value": "pt-br", + "name":"PtBr", + "description": "Query language value for pt-br." + }, + { + "value": "pt-pt", + "name":"PtPt", + "description": "Query language value for pt-pt." + }, + { + "value": "it-it", + "name":"ItIt", + "description": "Query language value for it-it." + }, + { + "value": "ja-jp", + "name":"JaJp", + "description": "Query language value for ja-jp." + }, + { + "value": "ko-kr", + "name":"KoKr", + "description": "Query language value for ko-kr." + }, + { + "value": "ru-ru", + "name":"RuRu", + "description": "Query language value for ru-ru." + }, + { + "value": "cs-cz", + "name":"CsCz", + "description": "Query language value for cs-cz." + }, + { + "value": "nl-be", + "name":"NlBe", + "description": "Query language value for nl-be." + }, + { + "value": "nl-nl", + "name":"NlNl", + "description": "Query language value for nl-nl." + }, + { + "value": "hu-hu", + "name":"HuHu", + "description": "Query language value for hu-hu." + }, + { + "value": "pl-pl", + "name":"PlPl", + "description": "Query language value for pl-pl." + }, + { + "value": "sv-se", + "name":"SvSe", + "description": "Query language value for sv-se." + }, + { + "value": "tr-tr", + "name":"TrTr", + "description": "Query language value for tr-tr." + }, + { + "value": "hi-in", + "name":"HiIn", + "description": "Query language value for hi-in." + }, + { + "value": "ar-sa", + "name":"ArSa", + "description": "Query language value for ar-sa." + }, + { + "value": "ar-eg", + "name":"ArEg", + "description": "Query language value for ar-eg." + }, + { + "value": "ar-ma", + "name":"ArMa", + "description": "Query language value for ar-ma." + }, + { + "value": "ar-kw", + "name":"ArKw", + "description": "Query language value for ar-kw." + }, + { + "value": "ar-jo", + "name":"ArJo", + "description": "Query language value for ar-jo." + }, + { + "value": "da-dk", + "name":"DaDk", + "description": "Query language value for da-dk." + }, + { + "value": "no-no", + "name":"NoNo", + "description": "Query language value for no-no." + }, + { + "value": "bg-bg", + "name":"BgBg", + "description": "Query language value for bg-bg." + }, + { + "value": "hr-hr", + "name":"HrHr", + "description": "Query language value for hr-hr." + }, + { + "value": "hr-ba", + "name":"HrBa", + "description": "Query language value for hr-ba." + }, + { + "value": "ms-my", + "name":"MsMy", + "description": "Query language value for ms-my." + }, + { + "value": "ms-bn", + "name":"MsBn", + "description": "Query language value for ms-bn." + }, + { + "value": "sl-sl", + "name":"SlSl", + "description": "Query language value for sl-sl." + }, + { + "value": "ta-in", + "name":"TaIn", + "description": "Query language value for ta-in." + }, + { + "value": "vi-vn", + "name":"ViVn", + "description": "Query language value for vi-vn." + }, + { + "value": "el-gr", + "name":"ElGr", + "description": "Query language value for el-gr." + }, + { + "value": "ro-ro", + "name":"RoRo", + "description": "Query language value for ro-ro." + }, + { + "value": "is-is", + "name":"IsIs", + "description": "Query language value for is-is." + }, + { + "value": "id-id", + "name":"IdId", + "description": "Query language value for id-id." + }, + { + "value": "th-th", + "name":"ThTh", + "description": "Query language value for th-th." + }, + { + "value": "lt-lt", + "name":"LtLt", + "description": "Query language value for lt-lt." + }, + { + "value": "uk-ua", + "name":"UkUa", + "description": "Query language value for uk-ua." + }, + { + "value": "lv-lv", + "name":"LvLv", + "description": "Query language value for lv-lv." + }, + { + "value": "et-ee", + "name":"EtEe", + "description": "Query language value for et-ee." + }, + { + "value": "ca-es", + "name":"CaEs", + "description": "Query language value for ca-es." + }, + { + "value": "fi-fi", + "name":"FiFi", + "description": "Query language value for fi-fi." + }, + { + "value": "sr-ba", + "name":"SrBa", + "description": "Query language value for sr-ba." + }, + { + "value": "sr-me", + "name":"SrMe", + "description": "Query language value for sr-me." + }, + { + "value": "sr-rs", + "name":"SrRs", + "description": "Query language value for sr-rs." + }, + { + "value": "sk-sk", + "name":"SkSk", + "description": "Query language value for sk-sk." + }, + { + "value": "nb-no", + "name":"NbNo", + "description": "Query language value for nb-no." + }, + { + "value": "hy-am", + "name":"HyAm", + "description": "Query language value for hy-am." + }, + { + "value": "bn-in", + "name":"BnIn", + "description": "Query language value for bn-in." + }, + { + "value": "eu-es", + "name":"EuEs", + "description": "Query language value for eu-es." + }, + { + "value": "gl-es", + "name":"GlEs", + "description": "Query language value for gl-es." + }, + { + "value": "gu-in", + "name":"GuIn", + "description": "Query language value for gu-in." + }, + { + "value": "he-il", + "name":"HeIl", + "description": "Query language value for he-il." + }, + { + "value": "ga-ie", + "name":"GaIe", + "description": "Query language value for ga-ie." + }, + { + "value": "kn-in", + "name":"KnIn", + "description": "Query language value for kn-in." + }, + { + "value": "ml-in", + "name":"MlIn", + "description": "Query language value for ml-in." + }, + { + "value": "mr-in", + "name":"MrIn", + "description": "Query language value for mr-in." + }, + { + "value": "fa-ae", + "name":"FaAe", + "description": "Query language value for fa-ae." + }, + { + "value": "pa-in", + "name":"PaIn", + "description": "Query language value for pa-in." + }, + { + "value": "te-in", + "name":"TeIn", + "description": "Query language value for te-in." + }, + { + "value": "ur-pk", + "name":"UrPk", + "description": "Query language value for ur-pk." } ] }, @@ -1668,6 +2097,10 @@ "type": "string", "description": "The name of a scoring profile to evaluate match scores for matching documents in order to sort the results." }, + "semanticConfiguration": { + "type": "string", + "description": "The name of a semantic configuration that will be used when processing documents for queries of type semantic." + }, "search": { "type": "string", "description": "A full-text search query expression; Use \"*\" or omit this parameter to match all documents.", @@ -1945,4 +2378,4 @@ "x-ms-parameter-location": "client" } } -} +} \ No newline at end of file diff --git a/specification/search/data-plane/Azure.Search/preview/2021-04-30-Preview/searchservice.json b/specification/search/data-plane/Azure.Search/preview/2021-04-30-Preview/searchservice.json index 18a3f1c3e092..898bc72059d8 100644 --- a/specification/search/data-plane/Azure.Search/preview/2021-04-30-Preview/searchservice.json +++ b/specification/search/data-plane/Azure.Search/preview/2021-04-30-Preview/searchservice.json @@ -5784,6 +5784,82 @@ }, "description": "Ranking function based on the Okapi BM25 similarity algorithm. BM25 is a TF-IDF-like algorithm that includes length normalization (controlled by the 'b' parameter) as well as term frequency saturation (controlled by the 'k1' parameter)." }, + "Semantic": { + "properties": { + "semanticConfigurations": { + "type": "array", + "items": { + "$ref": "#/definitions/SemanticConfiguration" + }, + "description": "The semantic configurations for the index." + } + }, + "externalDocs": { + "url": "https://docs.microsoft.com/azure/search/semantic-search-overview" + }, + "description": "Defines parameters for a search index that influence semantic capabilities." + }, + "SemanticConfiguration": { + "properties": { + "name": { + "externalDocs": { + "url": "https://docs.microsoft.com/rest/api/searchservice/Naming-rules" + }, + "type": "string", + "description": "The name of the semantic configuration.", + "x-nullable": false + }, + "prioritizedFields": { + "$ref": "#/definitions/PrioritizedFields", + "x-nullable": false, + "description": "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." + } + }, + "required": [ + "name", + "prioritizedFields" + ], + "externalDocs": { + "url": "https://docs.microsoft.com/azure/search/semantic-search-overview" + }, + "description": "Defines a specific configuration to be used in the context of semantic capabilities." + }, + "PrioritizedFields": { + "properties": { + "titleField": { + "$ref": "#/definitions/SemanticField", + "description": "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." + }, + "prioritizedContentFields": { + "type": "array", + "items": { + "$ref": "#/definitions/SemanticField" + }, + "description": "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." + }, + "prioritizedKeywordsFields": { + "type": "array", + "items": { + "$ref": "#/definitions/SemanticField" + }, + "description": "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." + } + }, + "externalDocs": { + "url": "https://docs.microsoft.com/azure/search/semantic-search-overview" + }, + "description": "Describes the title, content, and keywords fields to be used for semantic ranking, captions, highlights, and answers." + }, + "SemanticField": { + "properties": { + "fieldName": { + "type": "string", + "description": "", + "x-nullable": false + } + }, + "description": "A field that is used as part of the semantic configuration." + }, "DataSourceCredentials": { "properties": { "connectionString": { @@ -7453,6 +7529,14 @@ "url": "https://docs.microsoft.com/azure/search/index-ranking-similarity" } }, + "semantic": { + "$ref": "#/definitions/Semantic", + "description": "Defines parameters for a search index that influence semantic capabilities.", + "externalDocs": { + "url": "https://docs.microsoft.com/azure/search/semantic-search-overview" + }, + "x-nullable": true + }, "@odata.etag": { "x-ms-client-name": "ETag", "type": "string", @@ -10044,4 +10128,4 @@ "x-ms-parameter-location": "method" } } -} +} \ No newline at end of file