Skip to content

Commit 9f95eae

Browse files
patrykk21jimczi
authored andcommitted
[Docs] Clarify search_after behavior
Closes #34232
1 parent a357bd3 commit 9f95eae

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/reference/search/request/search-after.asciidoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ of the sort specification. Otherwise the sort order for documents that have
3737
the same sort values would be undefined and could lead to missing or duplicate
3838
results. The <<mapping-id-field,`_id` field>> has a unique value per document
3939
but it is not recommended to use it as a tiebreaker directly.
40+
Beware that `search_after` looks for the first document which fully or partially
41+
matches tiebreaker's provided value. Therefore if a document has a tiebreaker value of
42+
`"654323"` and you `search_after` for `"654"` it would still match that document
43+
and return results found after it.
4044
<<doc-values,doc value>> are disabled on this field so sorting on it requires
4145
to load a lot of data in memory. Instead it is advised to duplicate (client side
4246
or with a <<ingest-processors,set ingest processor>>) the content

0 commit comments

Comments
 (0)