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
+18-4Lines changed: 18 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -203,7 +203,7 @@ api-key: {{admin-api-key}}
203
203
204
204
**Key points:**
205
205
206
-
+ Semantic ranking accepts up to 50 results from the merged response. Set "k" and "top" to 50 for equal representation of both queries.
206
+
+ Semantic ranking accepts up to 50 results from the merged response.
207
207
208
208
+ "queryType" and "semanticConfiguration" are required.
209
209
@@ -338,14 +338,28 @@ The examples in this article used a "select" statement to specify text (nonvecto
338
338
339
339
### Number of results
340
340
341
-
A query might match to any number of documents, as many as all of them if the search criteria are weak (for example "search=*" for a null query). Because it's seldom practical to return unbounded results, you should specify a maximum for the response:
341
+
A query might match to any number of documents, as many as all of them if the search criteria are weak (for example "search=*" for a null query). Because it's seldom practical to return unbounded results, you should specify a maximum for the *overall response*:
342
342
343
+
+`"top": n` results for keyword-only queries (no vector)
343
344
+`"k": n` results for vector-only queries
344
-
+`"top": n` results for hybrid queries that include a "search" parameter
345
+
+`"top": n` results for hybrid queries (with or without semantic) that include a "search" parameter
345
346
346
347
Both "k" and "top" are optional. Unspecified, the default number of results in a response is 50. You can set "top" and "skip" to [page through more results](search-pagination-page-layout.md#paging-results) or change the default.
347
348
348
-
If you're using semantic ranking, it's a best practice to set both "k" and "top" to at least 50. The semantic ranker can take up to 50 results. By specifying 50 for each query, you get equal representation from both search subsystems.
349
+
> [!NOTE]
350
+
> 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-preview). Combine this with a setting for "k" to control the representation from each search subsystem (keyword and vector).
351
+
352
+
#### Semantic ranker results
353
+
354
+
> [!NOTE]
355
+
> The semantic ranker can take up to 50 results.
356
+
357
+
If you're using semantic ranking in 2024-05-01-preview API, it's a best practice to set "k" and "maxTextRecallSize" to sum to at least 50 total. You can then restrict the results returned to the user with the "top" parameter.
358
+
359
+
If you're using semantic ranking in previous APIs do the following:
360
+
361
+
+ if doing keyword-only search (no vector) set "top" to 50
362
+
+ if doing hybrid search set "k" to 50, to ensure that the semantic ranker gets at least 50 results.
0 commit comments