Skip to content

Commit

Permalink
Adding log of pagination_depth and correcting is null check
Browse files Browse the repository at this point in the history
Signed-off-by: Varun Jain <[email protected]>
  • Loading branch information
vibrantvarun committed Jan 14, 2025
1 parent 2c029ab commit 0eb2641
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public HybridQuery(final Collection<Query> subQueries, final List<Query> filterQ
throw new IllegalArgumentException("collection of queries must not be empty");
}
Integer paginationDepth = hybridQueryContext.getPaginationDepth();
if (paginationDepth != null && paginationDepth == 0) {
if (Objects.nonNull(paginationDepth) && paginationDepth == 0) {
throw new IllegalArgumentException("pagination_depth must not be zero");
}
if (Objects.isNull(filterQueries) || filterQueries.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ private static int getSubqueryResultsRetrievalSize(final SearchContext searchCon
if (searchContext.from() == 0) {
return searchContext.size();
}
log.info("pagination_depth is {}", paginationDepth);
return paginationDepth;
}

Expand Down

0 comments on commit 0eb2641

Please sign in to comment.