Skip to content

Commit

Permalink
throw exception when from is not equal to 0
Browse files Browse the repository at this point in the history
Signed-off-by: Varun Jain <[email protected]>
  • Loading branch information
vibrantvarun committed Sep 3, 2024
1 parent 01736e1 commit 0b12c4f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ public void preProcess(SearchContext context) {
delegateAggsProcessor.preProcess(context);

if (isHybridQuery(context.query(), context)) {
if (context.from() != 0) {
throw new IllegalArgumentException("In the current OpenSearch version pagination is not supported with hybrid query");
}
// adding collector manager for hybrid query
CollectorManager collectorManager;
try {
Expand Down

0 comments on commit 0b12c4f

Please sign in to comment.