Skip to content

Commit 67410a2

Browse files
add note regarding LIMIT behavior (#670)
* add note regarding LIMIT behavior * Update content/commands/ft.search/index.md --------- Co-authored-by: David Dougherty <[email protected]>
1 parent d66bc65 commit 67410a2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

content/commands/ft.search/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,8 @@ orders the results by the value of this attribute. This applies to both text and
478478
<summary><code>LIMIT first num</code></summary>
479479

480480
limits the results to the offset and number of results given. Note that the offset is zero-indexed. The default is 0 10, which returns 10 items starting from the first result. You can use `LIMIT 0 0` to count the number of documents in the result set without actually returning them.
481+
482+
**`LIMIT` behavior**: If you use the `LIMIT` option without sorting, the results returned are non-deterministic, which means that subsequent queries may return duplicated or missing values. Add `SORTBY` with a unique field, or use `FT.AGGREGATE` with the `WITHCURSOR` option to ensure deterministic result set paging.
481483
</details>
482484

483485
<details open>

0 commit comments

Comments
 (0)