Expand description
The order of /find results (CONTRACT-http-listing L5, [25 Nov]): a true order.
today_cmp is today’s key (what find.rs sorts by in 0.5.x); order is the sort by sort_keys and
cmp_sort_keys.
- Group. Results that share a subject form one group; a result in no subject is a group of its own.
- Place the groups. Each group takes the place its best member has by today’s key (match type, then score descending, then kind, then name); groups are sorted by that key.
- Order inside a group by catalogue rank (1 first); equal ranks by today’s key.
A result’s subject, for the order, is the one subject (of the catalogue job’s source(k) cells) in which it has its
lowest rank; on a tie, the subject whose key encoding is first in byte order. With no subjects at all, the order is
exactly today’s.
Structs§
- FindKey
- What the order knows of one result. Names are unique within one answer.
- SortKey
- The key of one result in the grouped order, given the whole answer (see
sort_keys). Opaque. - Subject
Rank - A result’s place in a subject: the subject’s key encoding (
<host>/catalog/subject(domain:"..",...)) and the result’s catalogue rank in it (1 first).
Functions§
- cmp_
sort_ keys - The comparison of two keys of one answer: the groups by their places (today’s key of the best members), then inside a group by catalogue rank, then by today’s key. Two results share a place exactly when they share a group, and names are unique, so the comparison is total.
- order
- The indices of
resultsin the order of/find(steps 1 to 3). The same multiset of results in any input order gives the same sequence of names. - sort_
keys - Each result’s key in the grouped order of the answer
results(in the same order asresults). Comparing two keys withcmp_sort_keysis a total order on the answer’s results. - today_
cmp - Today’s key (0.5.x): match type, then score descending, then kind, then name.