You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/search/hybrid-search-how-to-query.md
+11-7Lines changed: 11 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,11 +35,11 @@ In this article, learn how to:
35
35
36
36
+ Search Explorer in the Azure portal (supports both stable and preview API search syntax) has a JSON view that lets you paste in a hybrid request.
37
37
38
-
+[**2024-07-01**](/rest/api/searchservice/documents/search-post) stable version or a recent preview API version if you're using preview features like [maxTextRecallSize and countAndFacetMode(preview)](#set-maxtextrecallsize-and-countandfacetmode).
38
+
+Newer stable or preview packages of the Azure SDKs (see change logs for SDK feature support).
39
39
40
-
For readability, we use REST examples to explain how the APIs work. You can use a REST client like Visual Studio Code with the REST extension to build hybrid queries. You can also use the Azure SDKs. For more information, see [Quickstart: Vector search](search-get-started-vector.md).
40
+
+[Stable REST APIs](/rest/api/searchservice/documents/search-post) or a recent preview API version if you're using preview features like [maxTextRecallSize and countAndFacetMode(preview)](#set-maxtextrecallsize-and-countandfacetmode).
41
41
42
-
+ Newer stable or beta packages of the Azure SDKs (see change logs for SDK feature support).
42
+
For readability, we use REST examples to explain how the APIs work. You can use a REST client like Visual Studio Code with the REST extension to build hybrid queries. You can also use the Azure SDKs. For more information, see [Quickstart: Vector search](search-get-started-vector.md).
43
43
44
44
## Set up a hybrid query
45
45
@@ -232,7 +232,11 @@ POST https://[service-name].search.windows.net/indexes/[index-name]/docs/search?
232
232
}
233
233
```
234
234
235
-
## Hybrid search with filter
235
+
## Hybrid query examples
236
+
237
+
This section has multiple query examples that illustrate hybrid query patterns.
238
+
239
+
### Example: Hybrid search with filter
236
240
237
241
This example adds a filter, which is applied to the `filterable` nonvector fields of the search index.
238
242
@@ -314,7 +318,7 @@ POST https://{{search-service-name}}.search.windows.net/indexes/{{index-name}}/d
314
318
}
315
319
```
316
320
317
-
## Semantic hybrid search
321
+
### Example: Semantic hybrid search
318
322
319
323
Assuming that you [have semantic ranker](semantic-how-to-enable-disable.md) and your index definition includes a [semantic configuration](semantic-how-to-query-request.md), you can formulate a query that includes vector search and keyword search, with semantic ranking over the merged result set. Optionally, you can add captions and answers.
320
324
@@ -357,7 +361,7 @@ api-key: {{admin-api-key}}
357
361
358
362
+ "captions" and "answers" are optional. Values are extracted from verbatim text in the results. An answer is only returned if the results include content having the characteristics of an answer to the query.
359
363
360
-
## Semantic hybrid search with filter
364
+
### Example: Semantic hybrid search with filter
361
365
362
366
Here's the last query in the collection. It's the same semantic hybrid query as the previous example, but with a filter.
363
367
@@ -429,7 +433,7 @@ Both `k` and `top` are optional. Unspecified, the default number of results in a
429
433
> [!NOTE]
430
434
> If you're using hybrid search in 2024-05-01-preview API, you can control the number of results from the keyword query using [maxTextRecallSize](#set-maxtextrecallsize-and-countandfacetmode). Combine this with a setting for `k` to control the representation from each search subsystem (keyword and vector).
0 commit comments