airborne12 commented on code in PR #66875:
URL: https://github.com/apache/doris/pull/66875#discussion_r3802064156


##########
be/src/storage/index/snii/snii_index_reader.cpp:
##########
@@ -153,6 +153,9 @@ bool 
uses_plain_term_frequency_scoring(InvertedIndexQueryType query_type,
 
 bool uses_phrase_frequency_scoring(InvertedIndexQueryType query_type,
                                    const InvertedIndexQueryInfo& query_info) {
+    // A single-token phrase-prefix is a plain prefix query, not a 
phrase-frequency query. Like V3,
+    // direct MATCH therefore publishes no BM25 score, while FunctionSearch 
carries the bitmap as
+    // a constant-score BitSetQuery.

Review Comment:
   Correction after isolating the independent tasks: the terminal PREFIX 
syntax-marker fix belongs to #66874 and has been removed from this PR at 
aef6b9e9fb4. #66875 now contains only the analyzed-shape scoring fix, so the 
two review findings remain independently reviewable and mergeable.



##########
be/src/storage/index/snii/snii_index_reader.cpp:
##########
@@ -153,6 +153,9 @@ bool 
uses_plain_term_frequency_scoring(InvertedIndexQueryType query_type,
 
 bool uses_phrase_frequency_scoring(InvertedIndexQueryType query_type,
                                    const InvertedIndexQueryInfo& query_info) {
+    // A single-token phrase-prefix is a plain prefix query, not a 
phrase-frequency query. Like V3,
+    // direct MATCH therefore publishes no BM25 score, while FunctionSearch 
carries the bitmap as
+    // a constant-score BitSetQuery.
     return query_info.term_infos.size() > 1 &&

Review Comment:
   Addressed and re-isolated at aef6b9e9fb4. The reader now derives 
frequency_scoring after query analysis: plain terms and multi-token phrase 
prefixes still open stats/norms and bypass cache, while a single-token prefix 
keeps constant SEARCH scoring and can use cache/single-flight without semantic 
scoring metadata. Focused ASAN coverage 
SniiIndexReaderCountFallback.*:PhrasePrefixQueryV2Test.* passes 43/43, and 
./build.sh --be -j 192 passes.



-- 
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]

Reply via email to