Skip to content

Commit

Permalink
rename hybrid query extraction method
Browse files Browse the repository at this point in the history
Signed-off-by: Varun Jain <[email protected]>
  • Loading branch information
vibrantvarun committed Jan 6, 2025
1 parent 1474905 commit d39a1b8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ private ReduceableSearchResult reduceSearchResults(final List<ReduceableSearchRe
* @return results size to collected
*/
private static int getSubqueryResultsRetrievalSize(final SearchContext searchContext) {
HybridQuery hybridQuery = extractHybridQueryFromAbstractQuery(searchContext.query());
HybridQuery hybridQuery = unwrapHybridQuery(searchContext.query());
int paginationDepth = hybridQuery.getQueryContext().getPaginationDepth();

// Switch to from+size retrieval size during standard hybrid query execution.
Expand All @@ -496,7 +496,7 @@ private static int getSubqueryResultsRetrievalSize(final SearchContext searchCon
/**
* Unwraps a HybridQuery from either a direct query or a nested BooleanQuery
*/
private static HybridQuery extractHybridQueryFromAbstractQuery(Query query) {
private static HybridQuery unwrapHybridQuery(Query query) {
HybridQuery hybridQuery;
// In case of nested fields and alias filter, hybrid query is wrapped under bool query and lies in the first clause.
if (query instanceof BooleanQuery) {
Expand Down

0 comments on commit d39a1b8

Please sign in to comment.