~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

knotless.dev
1 collaborator

knotless 0.13.0 Latest 2 packages, 1 image

1
10

Docs say how a code search orders files scored alike

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:docs/search-order

What changes

api.md says more plainly how searchCode orders files scored alike: by repository, then path. serve.md adds the one place that order can still vary. Zoekt cuts at the 200th file, and files tied exactly there can differ from one ask to the next, so only the last page's last files may change.

Why

These are the review's notes on A code search's pages go on from the one before: the api.md sentence read awkwardly, and the design note didn't say where the fixed order stops holding.

How it was checked

Docs only, and docs runs on it.

🤖 Generated with Claude Code

Approved

This is a docs-only change. It rewords the searchCode ordering sentence in api.md. It also adds a note to serve.md saying that files tied at Zoekt's 200th place are the only ones whose order can vary between asks. The note's logic holds. Each page asks Zoekt for the best 200 and sorts ties by repository and path, so only the tied files cut at the boundary can differ. Those land in the last page's tail. I didn't check the claim against the search code. I found nothing to change. AGENTS.md asks for no other files with this kind of change, and the docs check covers links.

Merged as cd22335