Search: order results newest first in every group
Chat hits sort by the chat's last use whatever field matched, and run, step, field, artifact and pipeline hits sort by their own date, before the result cap applies so the cap drops the oldest. Each kind's row scan also walks newest first. Score still reports the match tier. The app sorts both groups newest first as well.
This commit is contained in:
+9
-5
@@ -107,10 +107,12 @@ confirmation.
|
||||
- `--type` is the only narrowing mechanism and takes one kind: `pipeline`,
|
||||
`version`, `run`, `step`, `field` or `artifact`. An unknown kind is an error,
|
||||
never a silently ignored filter.
|
||||
- Ranking: an exact name match (score 3) beats a name substring (2) beats a
|
||||
body-text match (1); equal tiers break by recency, then a stable kind/target
|
||||
order. Every result carries `score`, `matched_field` and `recency` so a client
|
||||
can re-rank.
|
||||
- Order: results are newest first by `recency` (pipeline/version creation,
|
||||
run creation, step start), then numeric id and target, before the cap applies,
|
||||
so the cap drops the oldest hits; each kind's row scan also walks newest
|
||||
first. `score` still records the match tier (exact name 3, name substring 2,
|
||||
body text 1). Every result carries `score`, `matched_field` and `recency` so a
|
||||
client can re-rank.
|
||||
- Bounds: the result cap defaults to 50 and clamps to 200 (`0` = default);
|
||||
every kind scans at most 2000 rows, and field-text scanning stops at 2000 steps
|
||||
or 1 MiB decoded. `truncated` plus `scanned_steps`, `scanned_bytes`, `cap` and
|
||||
@@ -128,7 +130,9 @@ confirmation.
|
||||
reports how many transcripts were read. Each chat yields at most one hit
|
||||
(`target` `chat:<session id>`, `matched_field` `title`, `directory` or
|
||||
`message`) whose `chat` payload carries the title, directory, harness and,
|
||||
for a message match, the message id, role and a snippet. The server answers it
|
||||
for a message match, the message id, role and a snippet. Hits are ordered by
|
||||
the chat's last use, newest first, whatever field matched, before the cap
|
||||
applies. The server answers it
|
||||
off the connection's read loop, so it never delays other replies; a newer chat
|
||||
search on the same connection cancels the previous one. The app sends it after
|
||||
its run search and shows the hits as a Chats group.
|
||||
|
||||
Reference in New Issue
Block a user