github-actions[bot] commented on code in PR #67180:
URL: https://github.com/apache/doris/pull/67180#discussion_r4090718641
##########
be/src/storage/index/inverted/query/phrase_query.cpp:
##########
@@ -53,6 +53,15 @@ void PhraseQuery::add(const InvertedIndexQueryInfo&
query_info) {
init_ordered_sloppy_phrase_matcher(query_info, is_similarity);
}
+ // Two-phase evaluation with a pushed-down candidate set: the candidate
+ // bitmap joins the leapfrog intersection (restricting doc-list walking and
+ // position verification to candidates) but never a matcher's postings, so
+ // phrase semantics stay with the real term iterators.
+ if (_context->candidate_rows != nullptr) {
+
_iterators.emplace_back(std::make_shared<RoaringDocIdIterator>(_context->candidate_rows));
+ _context->candidate_rows_consumed = true;
Review Comment:
[P2] Preserve caching for globally empty CLucene phrases
The SNII executor now delays this reply until after its missing-term exits,
but this parallel CLucene path still marks the candidate consumed before
search. If any required real posting has `doc_freq() == 0`, the phrase (and a
zero-expansion multi-term phrase-prefix) is globally empty regardless of the
candidate; nevertheless `FullTextIndexReader` sees this flag and skips
query-cache insertion, so every selective scan recomputes the same miss. Please
detect the empty required posting before reporting consumption, or return an
execution-domain outcome as SNII now does, and add a cold candidate/second-run
cache-hit test for the V2 path.
--
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]