Expand description
§4.3 score-field detection.
Given the parsed items list, identify a numeric field that should be treated as the score. Preference order:
- Named candidates (in this order):
score,rank,relevance,confidence,bm25,distance. The first candidate that resolves to a numeric value at the top level on the first item is chosen. - Single nested numeric: if no named candidate matches, walk the
first item recursively. If exactly one path resolves to a numeric
value, use it. More than one → no score detected with the
fallback reason
"multiple numeric fields, none named". - Top-level beats nested when multiple named candidates appear at different depths (the top-level candidate wins).
“No score detected” is a normal outcome, not an error — the caller falls back to grouping (§5).
Structs§
- Score
Detection - Outcome of §4.3 score-field detection.
- Score
Options - Tunable inputs for §4.3 score-field detection.
Functions§
- detect_
score - §4.3: scan the items for a numeric score field.
- detect_
score_ with_ options - §4.3 score detection with caller-supplied named candidates.
- validate_
score_ path - Validate a user-supplied
--score=PATH.