github-actions[bot] commented on code in PR #65549:
URL: https://github.com/apache/doris/pull/65549#discussion_r3575949171
##########
be/src/storage/index/inverted/query_v2/collect/multi_segment_util.h:
##########
@@ -171,7 +171,6 @@ inline QueryExecutionContext create_segment_context(const
QueryExecutionContext&
}
seg_ctx.binding_fields = original_ctx.binding_fields;
Review Comment:
This fixes the full doc-set case, but the same segment context is used by
`collect_multi_segment_top_k()`. In that path we build scorers from `seg_ctx`,
keep only `k` docs per segment and then globally, and only later does
`FunctionSearch` rebuild a global scorer and call `mask_out_null()`. Because
this context no longer has a resolver, nullable `NOT`/boolean scorers treat
NULL rows as ordinary matches during top-k selection; after the later mask
removes those rows, the next non-NULL candidates have already been discarded. A
concrete shape is `top_k=3` over docs `0..3` where doc 0 is NULL for the field
and the query is `NOT missing`: top-k can retain `0,1,2` on equal scores, the
global mask drops `0`, and doc `3` is never reconsidered. Please either
filter/mark NULL rows before top-k truncation using segment-local null bitmaps,
or apply the original global NULL mask before enforcing the final `k`, and add
a scored descending top-k regression.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]