Skip to content

Commit 6108058

Browse files
committed
fix acrolinx checks and syntax issues
1 parent 2722c98 commit 6108058

File tree

1 file changed

+38
-37
lines changed

1 file changed

+38
-37
lines changed

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

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -51,25 +51,26 @@ A few query capabilities bypass relevance scoring, which makes them incompatible
5151

5252
## Set up the query
5353

54-
By default, queries do not use semantic ranking. To use semantic ranking, two different parameters may be used. Each parameter supports a different set of scenarios:
54+
By default, queries don't use semantic ranking. To use semantic ranking, two different parameters may be used. Each parameter supports a different set of scenarios:
5555

5656
1. Specify `queryType` as `"semantic"`:
5757
+ [Text search](search-lucene-query-architecture.md) with a simple plain text query. Empty queries result in no semantic ranking being applied to the results.
5858
+ [Hybrid search](hybrid-search-overview.md).
59-
+ [Simple](query-simple-syntax.md) or [full](query-lucene-syntax.md) syntax cannot be used.
59+
+ [Simple](query-simple-syntax.md) or [full](query-lucene-syntax.md) syntax can't be used.
6060
1. Specify `semanticQuery`:
6161
+ [Text search](search-lucene-query-architecture.md) using the [simple](query-simple-syntax.md) or [full](query-lucene-syntax.md) syntax.
6262
+ [Vector search](vector-search-overview.md).
6363
+ [Hybrid search](hybrid-search-overview.md).
64-
+ The query specified for `semanticQuery` must be a simple plain text query. Empty queries are not supported.
64+
+ The query specified for `semanticQuery` must be a plain text query. Empty queries aren't supported.
6565

6666
The following table illustrates the supported scenarios depending on which semantic ranking parameter is used:
67+
6768
| Semantic Ranker Parameter | Plain text search | [Simple text search syntax](query-simple-syntax.md) | [Full text search syntax](query-lucene-syntax.md) | [Vector search](vector-search-overview.md) | [Hybrid Search](hybrid-search-overview.md) | [Semantic answers](semantic-answers.md) and captions |
6869
|-|-|-|-|-|-|-|
6970
| Set "queryType" to "semantic" |||||||
7071
| Set "semanticQuery"<sup>1</sup> |||||||
7172

72-
<sup>1</sup> "semanticQuery" is not supported in the portal [search explorer](search-explorer.md).
73+
<sup>1</sup> "semanticQuery" isn't supported in the portal [search explorer](search-explorer.md).
7374

7475
Regardless of the parameter chosen, the index should contain text fields with rich semantic content and a [semantic configuration](semantic-how-to-configure.md).
7576

@@ -87,7 +88,7 @@ Regardless of the parameter chosen, the index should contain text fields with ri
8788

8889
1. Enter a query, such as "historic hotel with good food", and select **Search**.
8990

90-
1. Alternatively, select **JSON view** and paste definitions into the query editor. The portal does not support using `"semanticQuery"`, so setting `"queryType"` to `"semantic"` is required:
91+
1. Alternatively, select **JSON view** and paste definitions into the query editor. The portal doesn't support using `"semanticQuery"`, so setting `"queryType"` to `"semantic"` is required:
9192

9293
:::image type="content" source="./media/semantic-search-overview/semantic-portal-json-query.png" alt-text="Screenshot showing JSON query syntax in the Azure portal." border="true":::
9394

@@ -117,24 +118,24 @@ The following example in this section uses the [hotels-sample-index](search-get-
117118

118119
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.
119120

120-
```http
121-
POST https://[search-service-name].search.windows.net/indexes/hotels-sample-index/docs/search?api-version=2024-07-01
122-
{
123-
"search": "interesting hotel with restaurant on site and cozy lobby or shared area",
124-
"count": true,
125-
"queryType": "semantic",
126-
"semanticConfiguration": "semantic-config",
127-
"captions": "extractive|highlight-true",
128-
"answers": "extractive|count-3",
129-
"highlightPreTag": "<strong>",
130-
"highlightPostTag": "</strong>",
131-
"select": "HotelId,HotelName,Description,Category"
132-
}
133-
```
121+
```http
122+
POST https://[search-service-name].search.windows.net/indexes/hotels-sample-index/docs/search?api-version=2024-07-01
123+
{
124+
"search": "interesting hotel with restaurant on site and cozy lobby or shared area",
125+
"count": true,
126+
"queryType": "semantic",
127+
"semanticConfiguration": "semantic-config",
128+
"captions": "extractive|highlight-true",
129+
"answers": "extractive|count-3",
130+
"highlightPreTag": "<strong>",
131+
"highlightPostTag": "</strong>",
132+
"select": "HotelId,HotelName,Description,Category"
133+
}
134+
```
134135

135136
1. Set `"queryType"` to `"semantic"`.
136137

137-
1. Set "search" to a simple plain text query. Since the "queryType" is set to semantic, neither [simple syntax](query-simple-syntax.md) or [full Lucene syntax](query-lucene-syntax.md) are supported. Supplying `*` or an empty string results in no semantic ranking being applied to the query.
138+
1. Set "search" to a simple plain text query. Since the "queryType" is set to semantic, [simple syntax](query-simple-syntax.md) or [full Lucene syntax](query-lucene-syntax.md) aren't supported. Supplying `*` or an empty string results in no semantic ranking being applied to the query.
138139

139140
1. Set "semanticConfiguration" to a [predefined semantic configuration](semantic-how-to-configure.md) that's embedded in your index.
140141

@@ -154,27 +155,27 @@ If you want to set `"queryType"` to `"semantic"`, paste the following request in
154155

155156
1. Send the request to execute the query and return results.
156157

157-
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:
158+
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:
158159

159-
```http
160-
POST https://[search-service-name].search.windows.net/indexes/hotels-sample-index/docs/search?api-version=2024-07-01
161-
{
162-
"search": "Description:breakfast",
163-
"semanticQuery": "interesting hotel with restaurant on site and cozy lobby or shared area",
164-
"count": true,
165-
"queryType": "full",
166-
"semanticConfiguration": "semantic-config",
167-
"captions": "extractive|highlight-true",
168-
"answers": "extractive|count-3",
169-
"highlightPreTag": "<strong>",
170-
"highlightPostTag": "</strong>",
171-
"select": "HotelId,HotelName,Description,Category"
172-
}
160+
```http
161+
POST https://[search-service-name].search.windows.net/indexes/hotels-sample-index/docs/search?api-version=2024-07-01
162+
{
163+
"search": "Description:breakfast",
164+
"semanticQuery": "interesting hotel with restaurant on site and cozy lobby or shared area",
165+
"count": true,
166+
"queryType": "full",
167+
"semanticConfiguration": "semantic-config",
168+
"captions": "extractive|highlight-true",
169+
"answers": "extractive|count-3",
170+
"highlightPreTag": "<strong>",
171+
"highlightPostTag": "</strong>",
172+
"select": "HotelId,HotelName,Description,Category"
173+
}
173174
```
174175
175-
1. Set `"queryType"` to the search syntax you are using, either [simple](query-simple-syntax.md) or [full](query-full-syntax.md)
176+
1. Set `"queryType"` to the search syntax you're using, either [simple](query-simple-syntax.md) or [full](query-lucene-syntax.md)
176177
177-
1. Set `"semanticQuery"` to the simple plain text query you want to use for semantic ranking. Empty queries are not supported.
178+
1. Set `"semanticQuery"` to the simple plain text query you want to use for semantic ranking. Empty queries aren't supported.
178179
179180
180181
### [**.NET SDK**](#tab/dotnet-query)

0 commit comments

Comments
 (0)