eldenmoon opened a new pull request, #69213:
URL: https://github.com/apache/doris/pull/69213

   ### What problem does this PR solve?
   
   Issue Number: None (DORIS-29489, branch-4.1)
   
   Problem Summary:
   
   SEARCH with `score()` over a VARIANT subcolumn needs the collection 
statistics the scan collects before the read starts, and those statistics are 
keyed by the Lucene field name of the path (`<parent uid>.<parent>.<path>`). 
The collector only sees the clause's field name, which is not a tablet-schema 
column while the VARIANT path is not materialized, so it has to resolve the 
subcolumn through its parent VARIANT column and the index that serves the path. 
When that resolution is missing, statistics are collected for no field at all 
and the read fails with `Index statistics collection failed: Not such column 
<uid>.<parent>.<path>`.
   
   Master resolves this already, but no regression suite exercises the 
combination: the existing VARIANT suites cover scored MATCH 
(`test_bm25_score_variant`) and unscored SEARCH 
(`test_search_variant_subcolumn_analyzer`), and the collector unit tests cover 
MATCH only. This suite covers the scored SEARCH combination for both ways a 
VARIANT path gets its index — a plain index on the parent VARIANT column 
inherited by the path, and a `field_pattern` index declared for the path — and 
pins the invariant that the VARIANT path and an equally indexed plain TEXT 
column produce the same BM25 scores for the same documents, plus phrase scoring 
from the path's positions and norms.
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test <!-- At least one of them must be included. -->
       - [x] Regression test
         Run locally on master: `./run-regression-test.sh --run -d search -s 
test_search_variant_subcolumn_bm25` (1 suite, failed 0).
       - [ ] Unit Test
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test. Explain why below to give a good 
reason
   - Behavior changed: No
   - Does this need documentation: No
   


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