github-actions[bot] commented on code in PR #68813:
URL: https://github.com/apache/doris/pull/68813#discussion_r4228261574


##########
fe/fe-core/src/main/java/org/apache/doris/tablefunction/LanceExternalSearchTableValuedFunction.java:
##########
@@ -206,6 +207,10 @@ protected static PreparedSearch prepareSearch(CommonSearch 
common, int fieldId,
                     .setFormat(TSearchFilterFormat.SQL)
                     
.setPayload(validateAndEncodeSqlFilter(common.params.get(FILTER))));
         }
+        // Keep the search-filter timing common to vector and full-text TVFs. 
Omission defaults
+        // to postfilter for both kinds of search.

Review Comment:
   [P1] Apply postfilter after merging split candidates. With `top_k=1`, 
`prefilter=false`, and two uncovered fragments, the nearest row in fragment A 
can fail `filter` while a farther row in fragment B passes. Each Lance scanner 
filters after its own TopK, so A emits nothing and B emits its row; Doris's 
global TopN returns B. A snapshot-wide TopK would rank A first and then 
postfilter to an empty result. The new default and explicit `false` both reach 
this path; separate FTS index segments have the same ordering. Preserve 
unfiltered candidates through the global TopN before applying the TVF 
postfilter, and cover two splits with a rejected global winner.



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