Skip to content

Commit e508af9

Browse files
authored
Merge pull request #113028 from mattmsft/patch-1
Clarify PATCH vs. PUT for enabling semantic search
2 parents 55d4db1 + f65cb5c commit e508af9

File tree

1 file changed

+22
-10
lines changed

1 file changed

+22
-10
lines changed

articles/search/semantic-search-overview.md

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -115,23 +115,35 @@ 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 using the REST API
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. Both PUT and PATCH can be used to update existing services, but only PUT can be used to create a new service. If PUT is used to update an existing service, it replaces all properties in the service with their defaults if they are not specified in the request. When PATCH is used to update an existing service, it only replaces properties that are specified in the request. When using PUT to update an existing service, it's possible to accidentally introduce an unexpected scaling or configuration change. When enabling semantic search on an existing service, it's recommended to use PATCH instead of PUT.
126+
127+
* Management REST API version 2021-04-01-Preview provides the semantic search property
123128

124-
* Management REST API version 2021-04-01-Preview provides this option
129+
* Owner or Contributor permissions are required to enable or disable features
125130

126-
* Owner or Contributor permissions are required to disable features
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+
## Disable semantic search using the REST API
141+
142+
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.
127143

128144
```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
145+
PATCH https://management.azure.com/subscriptions/{{subscriptionId}}/resourcegroups/{{resource-group}}/providers/Microsoft.Search/searchServices/{{search-service-name}}?api-version=2021-04-01-Preview
130146
{
131-
"location": "{{region}}",
132-
"sku": {
133-
"name": "standard"
134-
},
135147
"properties": {
136148
"semanticSearch": "disabled"
137149
}

0 commit comments

Comments
 (0)