Skip to content

Commit 6ecf218

Browse files
committed
Fixed formatting bugs
1 parent 113a33a commit 6ecf218

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

articles/search/semantic-how-to-query-request.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ A few query capabilities bypass relevance scoring, which makes them incompatible
5353

5454
By default, queries don't use semantic ranking. To use semantic ranking, two different parameters can be used. Each parameter supports a different set of scenarios.
5555

56-
Semantic queries, whether specified through `search` plus `queryType`, or through `semanticQuery`, must be plain text.
57-
58-
Semantic queries can't be empty. Empty queries result in no semantic ranking being applied to the results.
56+
Semantic queries, whether specified through `search` plus `queryType`, or through `semanticQuery`, must be plain text and they can't be empty. Empty queries result in no semantic ranking being applied to the results.
5957

6058
<!--
6159
1. Set `queryType` to `semantic`:
@@ -70,8 +68,8 @@ Semantic queries can't be empty. Empty queries result in no semantic ranking bei
7068

7169
| Semantic ranker parameter | [Plain text search](search-query-create.md) | [Simple text search syntax](query-simple-syntax.md) | [Full text search syntax](query-lucene-syntax.md) | [Vector search](vector-search-how-to-query.md) | [Hybrid Search](hybrid-search-how-to-query.md) | [Semantic answers](semantic-answers.md) and captions |
7270
|-|-|-|-|-|-|-|
73-
| `queryType`: `semantic` <sup>1</sup> |||||||
74-
| `semanticQuery`<sup>2</sup>: "<your plain text query>" |||||||
71+
| `queryType-semantic` <sup>1</sup> |||||||
72+
| `semanticQuery="<your plain text query>"`<sup>2</sup> |||||||
7573

7674
<sup>1</sup> `queryType=semantic` can't support explicit `simple` or `full` values because the `queryType` parameter is being used for `semantic`. The effective query behaviors are the defaults of the simple parser.
7775

@@ -119,7 +117,9 @@ Use [Search Documents](/rest/api/searchservice/documents/search-post) to formula
119117

120118
A response includes an `@search.rerankerScore` automatically. If you want captions or answers in the response, enable semantic ranking by setting `queryType` to `semantic` or setting `semanticQuery` and adding captions and answers to the request.
121119

122-
The following example in this section uses the [hotels-sample-index](search-get-started-portal.md) to demonstrate semantic ranking with semantic answers and captions.
120+
The following examples in this section uses the [hotels-sample-index](search-get-started-portal.md) to demonstrate semantic ranking with semantic answers and captions.
121+
122+
#### Use queryType=semantic
123123

124124
If you want to set `queryType` to `semantic`, paste the following request into a web client as a template. Replace `search-service-name` with your search service name and replace `hotels-sample-index` if you have a different index name.
125125

@@ -160,6 +160,8 @@ POST https://[search-service-name].search.windows.net/indexes/hotels-sample-inde
160160

161161
1. Send the request to execute the query and return results.
162162

163+
#### Use semanticQuery
164+
163165
If you want to use "semanticQuery" in order to use [vector search](vector-search-overview.md), [simple text syntax](query-simple-syntax.md), or [full text syntax](query-lucene-syntax.md), adjust your request to the following JSON:
164166

165167
```http
@@ -176,13 +178,12 @@ POST https://[search-service-name].search.windows.net/indexes/hotels-sample-inde
176178
"highlightPostTag": "</strong>",
177179
"select": "HotelId,HotelName,Description,Category"
178180
}
179-
```
181+
```
180182

181183
1. Set `queryType` to the search syntax you're using, either [simple](query-simple-syntax.md) or [full](query-lucene-syntax.md).
182184

183185
1. Set `semanticQuery` to the simple plain text query you want to use for semantic ranking. Empty queries aren't supported.
184186

185-
186187
### [**.NET SDK**](#tab/dotnet-query)
187188

188189
Use QueryType or SemanticQuery to invoke semantic ranker on a semantic query. The [following example](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/search/Azure.Search.Documents/samples/Sample08_SemanticSearch.md) is from the Azure SDK team.

0 commit comments

Comments
 (0)