From f91e71e4bd7815443fa7dcfe1d178a5a40284d6f Mon Sep 17 00:00:00 2001 From: Bruce Johnston Date: Wed, 29 Jul 2020 11:27:03 -0700 Subject: [PATCH 1/2] [Azure Cognitive Search] Add missing x-nullable annotations, part 2 Fixes https://github.com/Azure/azure-rest-api-specs/issues/10226 --- .../2020-06-30-Preview/searchservice.json | 27 ++++++++++++------- .../preview/2020-06-30/searchservice.json | 27 ++++++++++++------- 2 files changed, 36 insertions(+), 18 deletions(-) diff --git a/specification/search/data-plane/Azure.Search/preview/2020-06-30-Preview/searchservice.json b/specification/search/data-plane/Azure.Search/preview/2020-06-30-Preview/searchservice.json index 3e28f11192a4..ff607b71c3b9 100644 --- a/specification/search/data-plane/Azure.Search/preview/2020-06-30-Preview/searchservice.json +++ b/specification/search/data-plane/Azure.Search/preview/2020-06-30-Preview/searchservice.json @@ -5518,12 +5518,14 @@ "k1": { "type": "number", "format": "double", - "description": "This property controls the scaling function between the term frequency of each matching terms and the final relevance score of a document-query pair. By default, a value of 1.2 is used. A value of 0.0 means the score does not scale with an increase in term frequency." + "description": "This property controls the scaling function between the term frequency of each matching terms and the final relevance score of a document-query pair. By default, a value of 1.2 is used. A value of 0.0 means the score does not scale with an increase in term frequency.", + "x-nullable": true }, "b": { "type": "number", "format": "double", - "description": "This property controls how the length of a document affects the relevance score. By default, a value of 0.75 is used. A value of 0.0 means no length normalization is applied, while a value of 1.0 means the score is fully normalized by the length of the document." + "description": "This property controls how the length of a document affects the relevance score. By default, a value of 0.75 is used. A value of 0.0 means no length normalization is applied, while a value of 1.0 means the score is fully normalized by the length of the document.", + "x-nullable": true } }, "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)." @@ -6246,21 +6248,24 @@ "url": "https://docs.microsoft.com/rest/api/searchservice/Language-support" }, "$ref": "#/definitions/LexicalAnalyzerName", - "description": "The name of the analyzer to use for the field. This option can be used only with searchable fields and it can't be set together with either searchAnalyzer or indexAnalyzer. Once the analyzer is chosen, it cannot be changed for the field. Must be null for complex fields." + "description": "The name of the analyzer to use for the field. This option can be used only with searchable fields and it can't be set together with either searchAnalyzer or indexAnalyzer. Once the analyzer is chosen, it cannot be changed for the field. Must be null for complex fields.", + "x-nullable": true }, "searchAnalyzer": { "externalDocs": { "url": "https://docs.microsoft.com/rest/api/searchservice/Language-support" }, "$ref": "#/definitions/LexicalAnalyzerName", - "description": "The name of the analyzer used at search time for the field. This option can be used only with searchable fields. It must be set together with indexAnalyzer and it cannot be set together with the analyzer option. This property cannot be set to the name of a language analyzer; use the analyzer property instead if you need a language analyzer. This analyzer can be updated on an existing field. Must be null for complex fields." + "description": "The name of the analyzer used at search time for the field. This option can be used only with searchable fields. It must be set together with indexAnalyzer and it cannot be set together with the analyzer option. This property cannot be set to the name of a language analyzer; use the analyzer property instead if you need a language analyzer. This analyzer can be updated on an existing field. Must be null for complex fields.", + "x-nullable": true }, "indexAnalyzer": { "externalDocs": { "url": "https://docs.microsoft.com/rest/api/searchservice/Language-support" }, "$ref": "#/definitions/LexicalAnalyzerName", - "description": "The name of the analyzer used at indexing time for the field. This option can be used only with searchable fields. It must be set together with searchAnalyzer and it cannot be set together with the analyzer option. This property cannot be set to the name of a language analyzer; use the analyzer property instead if you need a language analyzer. Once the analyzer is chosen, it cannot be changed for the field. Must be null for complex fields." + "description": "The name of the analyzer used at indexing time for the field. This option can be used only with searchable fields. It must be set together with searchAnalyzer and it cannot be set together with the analyzer option. This property cannot be set to the name of a language analyzer; use the analyzer property instead if you need a language analyzer. Once the analyzer is chosen, it cannot be changed for the field. Must be null for complex fields.", + "x-nullable": true }, "synonymMaps": { "externalDocs": { @@ -6540,7 +6545,8 @@ "text": { "x-ms-client-name": "TextWeights", "$ref": "#/definitions/TextWeights", - "description": "Parameters that boost scoring based on text matches in certain index fields." + "description": "Parameters that boost scoring based on text matches in certain index fields.", + "x-nullable": true }, "functions": { "type": "array", @@ -6695,7 +6701,8 @@ }, "corsOptions": { "$ref": "#/definitions/CorsOptions", - "description": "Options to control Cross-Origin Resource Sharing (CORS) for the index." + "description": "Options to control Cross-Origin Resource Sharing (CORS) for the index.", + "x-nullable": true }, "suggesters": { "type": "array", @@ -6749,7 +6756,8 @@ "description": "A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your data when you want full assurance that no one, not even Microsoft, can decrypt your data in Azure Cognitive Search. Once you have encrypted your data, it will always remain encrypted. Azure Cognitive Search will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your data will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019.", "externalDocs": { "url": "https://aka.ms/azure-search-encryption-with-cmk" - } + }, + "x-nullable": true }, "similarity": { "$ref": "#/definitions/Similarity", @@ -8371,7 +8379,8 @@ "description": "A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your data when you want full assurance that no one, not even Microsoft, can decrypt your data in Azure Cognitive Search. Once you have encrypted your data, it will always remain encrypted. Azure Cognitive Search will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your data will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019.", "externalDocs": { "url": "https://aka.ms/azure-search-encryption-with-cmk" - } + }, + "x-nullable": true }, "@odata.etag": { "x-ms-client-name": "ETag", diff --git a/specification/search/data-plane/Azure.Search/preview/2020-06-30/searchservice.json b/specification/search/data-plane/Azure.Search/preview/2020-06-30/searchservice.json index 0aa98b1378f8..57a5eedf1b93 100644 --- a/specification/search/data-plane/Azure.Search/preview/2020-06-30/searchservice.json +++ b/specification/search/data-plane/Azure.Search/preview/2020-06-30/searchservice.json @@ -5518,12 +5518,14 @@ "k1": { "type": "number", "format": "double", - "description": "This property controls the scaling function between the term frequency of each matching terms and the final relevance score of a document-query pair. By default, a value of 1.2 is used. A value of 0.0 means the score does not scale with an increase in term frequency." + "description": "This property controls the scaling function between the term frequency of each matching terms and the final relevance score of a document-query pair. By default, a value of 1.2 is used. A value of 0.0 means the score does not scale with an increase in term frequency.", + "x-nullable": true }, "b": { "type": "number", "format": "double", - "description": "This property controls how the length of a document affects the relevance score. By default, a value of 0.75 is used. A value of 0.0 means no length normalization is applied, while a value of 1.0 means the score is fully normalized by the length of the document." + "description": "This property controls how the length of a document affects the relevance score. By default, a value of 0.75 is used. A value of 0.0 means no length normalization is applied, while a value of 1.0 means the score is fully normalized by the length of the document.", + "x-nullable": true } }, "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)." @@ -6246,21 +6248,24 @@ "url": "https://docs.microsoft.com/rest/api/searchservice/Language-support" }, "$ref": "#/definitions/LexicalAnalyzerName", - "description": "The name of the analyzer to use for the field. This option can be used only with searchable fields and it can't be set together with either searchAnalyzer or indexAnalyzer. Once the analyzer is chosen, it cannot be changed for the field. Must be null for complex fields." + "description": "The name of the analyzer to use for the field. This option can be used only with searchable fields and it can't be set together with either searchAnalyzer or indexAnalyzer. Once the analyzer is chosen, it cannot be changed for the field. Must be null for complex fields.", + "x-nullable": true }, "searchAnalyzer": { "externalDocs": { "url": "https://docs.microsoft.com/rest/api/searchservice/Language-support" }, "$ref": "#/definitions/LexicalAnalyzerName", - "description": "The name of the analyzer used at search time for the field. This option can be used only with searchable fields. It must be set together with indexAnalyzer and it cannot be set together with the analyzer option. This property cannot be set to the name of a language analyzer; use the analyzer property instead if you need a language analyzer. This analyzer can be updated on an existing field. Must be null for complex fields." + "description": "The name of the analyzer used at search time for the field. This option can be used only with searchable fields. It must be set together with indexAnalyzer and it cannot be set together with the analyzer option. This property cannot be set to the name of a language analyzer; use the analyzer property instead if you need a language analyzer. This analyzer can be updated on an existing field. Must be null for complex fields.", + "x-nullable": true }, "indexAnalyzer": { "externalDocs": { "url": "https://docs.microsoft.com/rest/api/searchservice/Language-support" }, "$ref": "#/definitions/LexicalAnalyzerName", - "description": "The name of the analyzer used at indexing time for the field. This option can be used only with searchable fields. It must be set together with searchAnalyzer and it cannot be set together with the analyzer option. This property cannot be set to the name of a language analyzer; use the analyzer property instead if you need a language analyzer. Once the analyzer is chosen, it cannot be changed for the field. Must be null for complex fields." + "description": "The name of the analyzer used at indexing time for the field. This option can be used only with searchable fields. It must be set together with searchAnalyzer and it cannot be set together with the analyzer option. This property cannot be set to the name of a language analyzer; use the analyzer property instead if you need a language analyzer. Once the analyzer is chosen, it cannot be changed for the field. Must be null for complex fields.", + "x-nullable": true }, "synonymMaps": { "externalDocs": { @@ -6540,7 +6545,8 @@ "text": { "x-ms-client-name": "TextWeights", "$ref": "#/definitions/TextWeights", - "description": "Parameters that boost scoring based on text matches in certain index fields." + "description": "Parameters that boost scoring based on text matches in certain index fields.", + "x-nullable": true }, "functions": { "type": "array", @@ -6695,7 +6701,8 @@ }, "corsOptions": { "$ref": "#/definitions/CorsOptions", - "description": "Options to control Cross-Origin Resource Sharing (CORS) for the index." + "description": "Options to control Cross-Origin Resource Sharing (CORS) for the index.", + "x-nullable": true }, "suggesters": { "type": "array", @@ -6749,7 +6756,8 @@ "description": "A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your data when you want full assurance that no one, not even Microsoft, can decrypt your data in Azure Cognitive Search. Once you have encrypted your data, it will always remain encrypted. Azure Cognitive Search will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your data will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019.", "externalDocs": { "url": "https://aka.ms/azure-search-encryption-with-cmk" - } + }, + "x-nullable": true }, "similarity": { "$ref": "#/definitions/Similarity", @@ -8371,7 +8379,8 @@ "description": "A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your data when you want full assurance that no one, not even Microsoft, can decrypt your data in Azure Cognitive Search. Once you have encrypted your data, it will always remain encrypted. Azure Cognitive Search will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your data will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019.", "externalDocs": { "url": "https://aka.ms/azure-search-encryption-with-cmk" - } + }, + "x-nullable": true }, "@odata.etag": { "x-ms-client-name": "ETag", From bc12b42c07090495d4dbc2a42ec987c7b85f4143 Mon Sep 17 00:00:00 2001 From: Bruce Johnston Date: Wed, 29 Jul 2020 12:12:56 -0700 Subject: [PATCH 2/2] [Azure Cognitive Search] Fix example causing validation error --- .../examples/SearchServiceGetServiceStatistics.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/specification/search/data-plane/Azure.Search/preview/2020-06-30/examples/SearchServiceGetServiceStatistics.json b/specification/search/data-plane/Azure.Search/preview/2020-06-30/examples/SearchServiceGetServiceStatistics.json index 13cb75e53894..fbbff6ad079a 100644 --- a/specification/search/data-plane/Azure.Search/preview/2020-06-30/examples/SearchServiceGetServiceStatistics.json +++ b/specification/search/data-plane/Azure.Search/preview/2020-06-30/examples/SearchServiceGetServiceStatistics.json @@ -30,10 +30,6 @@ "synonymMaps": { "usage": 2, "quota": 3 - }, - "skillsetCount": { - "usage": 0, - "quota": 3 } }, "limits": {