github-actions[bot] commented on code in PR #69051:
URL: https://github.com/apache/doris/pull/69051#discussion_r4295241438
##########
be/src/storage/index/inverted/reader/collection_statistics.cpp:
##########
@@ -43,8 +43,10 @@ namespace collection_statistics_detail {
Result<SniiScoringSegmentStats> resolve_snii_scoring_segment(uint64_t
index_doc_count,
uint64_t
sum_total_term_freq,
- bool
has_positions, bool has_norms) {
- if (!has_positions || !has_norms) {
+ bool
has_positions, bool has_norms,
+ bool is_analyzed)
{
+ // A keyword posting has implicit frequency and length one, without either
section.
+ if (is_analyzed && (!has_positions || !has_norms)) {
Review Comment:
[P1] Support docs-only keywords in scored SNII conjunctions
This now admits keyword SNII indexes without positions, but the scored AND
path still requires them. On the SNII schema from the new keyword-filter
regression, `SELECT id, score() AS s FROM t WHERE SEARCH('body:apple AND
tag:x', '{"mode":"standard"}') ORDER BY s DESC LIMIT 10` reaches
`OperatorBooleanWeight::listed_terms`. SNII sources always batch reads,
including a single `tag` term, so `ListedTerms::open(true, true)` calls
`open_terms(..., positions=true, scoring=false)`; `SniiIndexSource` rejects the
keyword source with `snii: the index holds no positions`. Support implicit unit
frequencies in this conjunction path or use the individual term scorers, and
add an internal SEARCH AND regression with WAND on/off. The new SQL AND filter
cases do not exercise this 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]