Skip to content

Commit 522d7a9

Browse files
committed
edited top/skip info
1 parent 67e9a21 commit 522d7a9

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

articles/search/hybrid-search-how-to-query.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -239,14 +239,12 @@ In a `hybridSearch` query parameter object, specify the maximum number of docume
239239

240240
The default maximum is `1000` documents.
241241

242-
With `maxTextRecallSize`, you can increase or decrease the number of BM25-ranked results returned in hybrid queries.
242+
With `maxTextRecallSize`, you can increase or decrease the number of BM25-ranked results returned in hybrid queries. The default is 1,000. The maximum is 10,000.
243243

244244
+ Reducing the number of text documents retrieved can significantly improve performance, assuming vector similarity search is generally performing better. You can also consider [vector weighting](vector-search-how-to-query.md#vector-weighting-preview) as an alternate approach for increasing the importance of vector queries.
245245

246246
+ Increasing the number of text documents is useful if you have a large index, and the `1000` document default is not capturing a sufficient number of results. With a larger BM25-ranked result set, you can also set `top`, `skip`, and `next` to retrieve portions of those results.
247247

248-
249-
250248
Use [Search - POST](/rest/api/searchservice/documents/search-post?view=rest-searchservice-2024-05-01-preview&preserve-view=true) or [Search - GET](/rest/api/searchservice/documents/search-get?view=rest-searchservice-2024-05-01-preview&preserve-view=true) in `2024-05-01-Preview` to specify these parameters.
251249

252250
The following example sets `maxTextRecallSize` to 100, which limits the results from the text side of the hybrid query to just 100 documents instead of all matches (up to 1,000 document default). It also sets `countAndFacetMode` to include only those results from `maxTextRecallSize`.
@@ -271,7 +269,7 @@ POST https://[service-name].search.windows.net/indexes/[index-name]/docs/search?
271269
}
272270
```
273271

274-
The next example sets `maxTextRecallSize` to 2,000. It also sets `countAndFacetMode` to scope acounts to just those results from `maxTextRecallSize`. It also uses top to return 200 in the initial results.
272+
The next example sets `maxTextRecallSize` to 5,000. It also uses top, skip, and next to pull results from large result sets. In this case, the request pulls 500 matches starting at position 1,500 through 2,000.
275273

276274
```http
277275
POST https://[service-name].search.windows.net/indexes/[index-name]/docs/search?api-version=2024-05-01-Preview
@@ -286,10 +284,11 @@ POST https://[service-name].search.windows.net/indexes/[index-name]/docs/search?
286284
    }
287285
  ],
288286
  "search": "hello world",
289-
"top": 200,
290-
"skip": 0,
287+
"top": 500,
288+
"skip": 1500,
289+
"next": 500,
291290
  "hybridSearch": {
292-
    "maxTextRecallSize": 2000,
291+
    "maxTextRecallSize": 5000,
293292
    "countAndFacetMode": "countRetrievableResults"
294293
  }
295294
}

articles/search/search-pagination-page-layout.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.service: cognitive-search
1010
ms.custom:
1111
- ignite-2023
1212
ms.topic: how-to
13-
ms.date: 08/31/2023
13+
ms.date: 06/12/2024
1414
---
1515

1616
# How to shape results in Azure AI Search
@@ -68,6 +68,8 @@ Count won't be affected by routine maintenance or other workloads on the search
6868

6969
By default, the search engine returns up to the first 50 matches. The top 50 are determined by search score, assuming the query is full text search or semantic. Otherwise, the top 50 are an arbitrary order for exact match queries (where uniform "@searchScore=1.0" indicates arbitrary ranking).
7070

71+
The upper limit is 1,000 documents returned per page of search results, so you can set top to return up to 1000 document in the first result. In newer preview APIs, if you're using a hybrid query, you can [specify maxTextRecallSize](hybrid-search-how-to-query.md#relevance-tuning-through-maxtextrecallsize-and-countandfacetmode-preview) to return up to 10,000 documents.
72+
7173
To control the paging of all documents returned in a result set, add `$top` and `$skip` parameters to the GET query request, or `top` and `skip` to the POST query request. The following list explains the logic.
7274

7375
+ Return the first set of 15 matching documents plus a count of total matches: `GET /indexes/<INDEX-NAME>/docs?search=<QUERY STRING>&$top=15&$skip=0&$count=true`

0 commit comments

Comments
 (0)