Ranking
How Quarry orders search results, and the small set of signals it uses to do it.
Search results come back ordered by a relevance score, highest first. Quarry uses a small, fixed set of signals to compute it rather than a configurable ranking pipeline. This page covers what those signals are, so results make sense at a glance.
Term frequency and rarity
A document scores higher when a query term appears more often in it, and higher still when that term is rare across the whole index. A word that appears in nearly every document, like “the” or “meeting” in a folder of meeting notes, contributes less to the score than a word that appears in only a handful of documents. This is the same idea behind classic term-frequency, inverse-document-frequency scoring, applied per index rather than globally across all of them.
Proximity
When a query has more than one term, documents where those terms appear close together score higher than documents where they appear far apart. A quoted phrase, covered in Query syntax, requires exact adjacency and does not use this signal at all, since either the phrase matches or it does not.
Recency
More recently modified files get a small boost, on the theory that a search over your own notes usually cares more about this week’s file than one from three years ago. The boost is gentle: a strong term match in an old file still outranks a weak match in a new one. There is no setting to change the weight of this signal in the current version.
Path signals
Files closer to the root of a watched folder score marginally higher than deeply nested
files, and a match in a file name scores higher than the same match only in the file’s body.
Searching ext:md AND path:notes/ explicitly, as covered in
Query syntax, is a more precise way to prioritize a location than
relying on this signal alone.
What ranking does not do
Ranking does not use file size, read history, or anything about who else searched for a term, since Quarry has no shared usage data between users or machines to draw on. Two people indexing the same folder independently see identical rankings for identical queries.
Ties
When two documents score identically, results are ordered by modification time, newest first. This keeps output stable across repeated runs of the same query against an unchanged index.
Last updated Aug 11, 2026