Skip to content

Commit f932269

Browse files
authored
Merge pull request #103120 from aahill/bing-video-update
[CogSvcs] safesearch updates
2 parents 6162fb7 + 192216a commit f932269

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

articles/cognitive-services/Bing-Custom-Search/search-your-custom-view.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ manager: nitinme
99
ms.service: cognitive-services
1010
ms.subservice: bing-custom-search
1111
ms.topic: conceptual
12-
ms.date: 05/09/2019
13-
ms.author: maheshb
12+
ms.date: 02/03/2020
13+
ms.author: aahi
1414
---
1515

1616
# Call your Bing Custom Search instance from the Portal
@@ -38,7 +38,7 @@ Clicking **Additional Parameters** reveals the following parameters:
3838

3939
|Parameter |Description |
4040
|---------|---------|
41-
|Safe Search | A filter used to filter webpages for adult content. Only available for the Web, Image, Video, and Hosted UI endpoints. |
41+
|Safe Search | A filter used to filter webpages for adult content. Only available for the Web, Image, Video, and Hosted UI endpoints. Note that Bing Custom Video Search only supports two values: `moderate` and `strict`. |
4242
|User Interface Language | The language used for user interface strings. For example, if you enable images and videos in Hosted UI, the **Image** and **Video** tabs use the specified language. |
4343
|Count | The number of search results to return in the response. Available only for Web, Image, and Video endpoints. |
4444
|Offset | The number of search results to skip before returning results. Available only for Web, Image, and Video endpoints. |

articles/cognitive-services/Bing-Video-Search/tutorial-bing-video-search-single-page-app.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ manager: nitinme
99
ms.service: cognitive-services
1010
ms.subservice: bing-video-search
1111
ms.topic: tutorial
12-
ms.date: 12/09/2019
12+
ms.date: 02/03/2020
1313
ms.author: aahi
1414
---
1515
# Tutorial: Single-page Video Search app
@@ -115,7 +115,7 @@ function bingSearchOptions(form) {
115115

116116
var options = [];
117117
options.push("mkt=" + form.where.value);
118-
options.push("SafeSearch=" + (form.safe.checked ? "strict" : "off"));
118+
options.push("SafeSearch=" + (form.safe.checked ? "strict" : "moderate"));
119119

120120
if (form.when.value.length) options.push("freshness=" + form.when.value);
121121
var what = [];
@@ -133,7 +133,7 @@ function bingSearchOptions(form) {
133133
}
134134
```
135135

136-
For example, the `SafeSearch` parameter in an actual API call can be `strict`, `moderate`, or `off`, with `moderate` being the default. Our form, however, uses a checkbox, which has only two states. The JavaScript code converts this setting to either `strict` or `off` (`moderate` is not used).
136+
For example, the `SafeSearch` parameter in an actual API call can be `strict`, or `moderate`, with `moderate` being the default.
137137

138138
## Performing the request
139139
Given the query, the options string, and the API key, the `BingWebSearch` function uses an `XMLHttpRequest` object to make the request to the Bing Search endpoint. You can use the global endpoint below, or the [custom subdomain](../../cognitive-services/cognitive-services-custom-subdomains.md) endpoint displayed in the Azure portal for your resource.

articles/cognitive-services/Bing-Web-Search/tutorial-bing-web-search-single-page-app.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function bingSearchOptions(form) {
100100
// Where option.
101101
options.push("mkt=" + form.where.value);
102102
// SafeSearch option.
103-
options.push("SafeSearch=" + (form.safe.checked ? "strict" : "off"));
103+
options.push("SafeSearch=" + (form.safe.checked ? "strict" : "moderate"));
104104
// Freshness option.
105105
if (form.when.value.length) options.push("freshness=" + form.when.value);
106106
var what = [];
@@ -123,7 +123,7 @@ function bingSearchOptions(form) {
123123
}
124124
```
125125

126-
`SafeSearch` can be set to `strict`, `moderate`, or `off`, with `moderate` being the default setting for Bing Web Search. This form uses a checkbox, which has two states. In this snippet, SafeSearch is set to `strict` or `off`, `moderate` isn't used.
126+
`SafeSearch` can be set to `strict`, `moderate`, or `off`, with `moderate` being the default setting for Bing Web Search. This form uses a checkbox, which has two states: `strict` or `moderate`.
127127

128128
If any of the **Promote** checkboxes are selected, the `answerCount` parameter is added to the query. `answerCount` is required when using the `promote` parameter. In this snippet, the value is set to `9` to return all available result types.
129129
> [!NOTE]

0 commit comments

Comments
 (0)