Skip to content

Commit efe7dfe

Browse files
Clarify PATCH vs. PUT for enabling semantic search
1 parent b6d46fd commit efe7dfe

File tree

1 file changed

+23
-10
lines changed

1 file changed

+23
-10
lines changed

articles/search/semantic-search-overview.md

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -115,23 +115,36 @@ By default, semantic search is disabled on all services. To enable semantic sear
115115

116116
Semantic Search's free plan is capped at 1,000 queries per month. After the first 1,000 queries in the free plan, you'll receive an error message letting you know you've exhausted your quota whenever you issue a semantic query. When this happens, you need to upgrade to the standard plan to continue using semantic search.
117117

118-
Alternatively, you can also enable semantic search using the [Create or Update Service API](/rest/api/searchmanagement/2021-04-01-preview/services/create-or-update#searchsemanticsearch) that's described in the next section.
118+
Alternatively, you can also enable semantic search using the REST API that's described in the next section.
119119

120-
## Disable semantic search
120+
## Enable semantic search
121121

122-
To reverse feature enablement, or for full protection against accidental usage and charges, you can [disable semantic search](/rest/api/searchmanagement/2021-04-01-preview/services/create-or-update#searchsemanticsearch) using the Create or Update Service API on your search service. After the feature is disabled, any requests that include the semantic query type will be rejected.
122+
To enable Semantic Search using the REST API, you can use the [Create or Update Service API](/rest/api/searchmanagement/2021-04-01-preview/services/create-or-update#searchsemanticsearch).
123+
124+
> [!NOTE]
125+
> Create or Update supports two HTTP methods: PUT and PATCH. PUT replaces all properties in the service with their defaults if they are not specified in the request. PATCH only replaces properties that are specified in the request. It's possible to accidentally introduce an unexpected scaling or configuration change if PUT is used. It's recommended to use PATCH when enabling semantic search.
123126
124-
* Management REST API version 2021-04-01-Preview provides this option
127+
* Management REST API version 2021-04-01-Preview provides the semantic search property
125128

126-
* Owner or Contributor permissions are required to disable features
129+
* Owner or Contributor permissions are required to enable or disable features
130+
131+
```
132+
PATCH https://management.azure.com/subscriptions/{{subscriptionId}}/resourcegroups/{{resource-group}}/providers/Microsoft.Search/searchServices/{{search-service-name}}?api-version=2021-04-01-Preview
133+
{
134+
"properties": {
135+
"semanticSearch": "standard"
136+
}
137+
}
138+
```
139+
140+
141+
## Disable semantic search
142+
143+
To reverse feature enablement, or for full protection against accidental usage and charges, you can [disable semantic search](/rest/api/searchmanagement/2021-04-01-preview/services/create-or-update#searchsemanticsearch) using the Create or Update Service API on your search service. After the feature is disabled, any requests that include the semantic query type will be rejected.
127144

128145
```http
129-
PUT https://management.azure.com/subscriptions/{{subscriptionId}}/resourcegroups/{{resource-group}}/providers/Microsoft.Search/searchServices/{{search-service-name}}?api-version=2021-04-01-Preview
146+
PATCH https://management.azure.com/subscriptions/{{subscriptionId}}/resourcegroups/{{resource-group}}/providers/Microsoft.Search/searchServices/{{search-service-name}}?api-version=2021-04-01-Preview
130147
{
131-
"location": "{{region}}",
132-
"sku": {
133-
"name": "standard"
134-
},
135148
"properties": {
136149
"semanticSearch": "disabled"
137150
}

0 commit comments

Comments
 (0)