Skip to content

Commit

Permalink
grrr
Browse files Browse the repository at this point in the history
  • Loading branch information
javanna committed Feb 5, 2024
1 parent 099f807 commit 5eb757a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1401,7 +1401,7 @@ private void parseSource(DefaultSearchContext context, SearchSourceBuilder sourc
if (CollectionUtils.isEmpty(source.searchAfter()) == false) {
assert context.scrollContext() == null
: "`search_after` cannot be used in a scroll context - should be validated in SearchRequest#validate";
assert context.from() == 0
assert context.from() <= 0
: "`from` parameter must be set to 0 when `search_after` is used - should be validated in SearchRequest#validate";
String collapseField = source.collapse() != null ? source.collapse().getField() : null;
FieldDoc fieldDoc = SearchAfterBuilder.buildFieldDoc(context.sort(), source.searchAfter(), collapseField);
Expand Down

0 comments on commit 5eb757a

Please sign in to comment.