Expand description
Covering-index picker for the ranked query, plus the shared prefix-value encoding.
Pure functions on the document type’s index map plus the
(group property, equality pins, axis, aggregate field) tuple
super::mode_detection resolved. No Drive, no proof — the server
and the SDK verifier both call these so they land on the same index
(and therefore the same grove path) for the same request.
Functions§
- encode_
prefix_ branches - Encode the resolved prefix pins into branches — one
Vec<Vec<u8>>of prefix path segments per branch, in index-property order (the same order and encoding the write path used to key those prefix value trees). A request with only==pins yields exactly one branch; the (at most one)INpin yields one branch per element. - find_
ranked_ index_ for_ axis - Find the index that can serve
axisranking grouped bygroup_by_propertywith the given equality pins, aggregatingaggregate_field. - find_
ranked_ index_ for_ mode find_ranked_index_for_axisdriven straight from a resolvedDocumentRankedMode— the shape every caller actually has.- no_
covering_ index_ message - The “no index covers this request” rejection text, shared by the
ranked and having-range resolutions (and the SDK’s mirrors of them)
so a rejected request reads identically everywhere. Names the exact
index the request needs: property list (pins first, in request
order, then the grouping property), ranking keyword, and
summablefield where applicable. On an indexOnly type, asumoravgnaming an index of the type that is no property (sum(byPost)) sums that index’s entries, which only asummableOffCountIndexindex over it does: the text then names that keyword, and the level-addressed ranking at the grouping property, since such an index continues below it to the source’s properties. - resolve_
ranked_ query_ for_ mode - Resolve a validated
DocumentRankedModeagainst a document type’s indexes into the executableDriveDocumentRankedQuery: pick the covering index, encode the prefix pins into prefix branches (one branch for all-==pins, one branch per element of the single permittedIN), and assemble the query.