How Monocle Search Sorts Results
Monocle does not use one fixed global sorting rule for every query. It first decides what kind of search you seem to be doing, then ranks results accordingly.
Short version
Most of the time, the top results are the ones that do the best job on these questions:
- Does this result cover the whole query? For multi-word searches, complete matches beat partial ones.
- Is it an exact or very close match? Exact words beat fuzzy matches. Smaller typos beat larger ones.
- Are the terms close together? A tight match in one place beats a page where the words are scattered far apart.
- Where did the match happen? Titles and strong structural fields matter a lot. For more natural-language searches, body text and descriptions matter more than they do for navigational searches.
- Does the query look like “take me to this specific page”? Short, navigational queries lean more heavily on things like titles, URLs, aliases, and headings.
- Is semantic matching helpful here? For longer, clearer searches, Monocle may blend in semantic matches. For short, exact, or already-confident queries, it turns that down or off.
- If everything else is close, which result is fresher? Newer content can win ties.
The short version is: Monocle tries to reward full, precise, well-located matches first, and only broadens out when the query actually benefits from it.
Nitty-gritty version
1. Monocle routes the query first
Before ranking, Monocle classifies the query.
- Exact-style queries: quoted phrases, URL-like searches, code-like strings, and similar “I mean this literally” searches are treated strictly.
- Navigational queries: short searches that look like “take me to the page for this” lean toward page-finding behavior.
- Natural-language queries: longer, more descriptive searches give more room to descriptions, body text, and semantic expansion.
That routing step changes both the field weighting and how much semantic matching is allowed.
2. Keyword matching still does most of the work
Within the lexical ranking pass, Monocle heavily prefers:
- Coverage: results matching all query terms beat results that miss one.
- Low typo distance: a one-edit match beats a two-edit match.
- Exact whole-word matches: exact words outrank looser prefix or fuzzy variants.
- Proximity: for multi-term queries, terms that appear close together rank better.
- Field importance: titles are strongest, and structural text can be very strong too; descriptions and body text matter more when the query reads like a topic rather than a destination.
- Exact phrase evidence: when the phrase appears as written, that helps.
- Recency and lexical score: these help break ties.
For multi-word searches, Monocle is stricter than the old docs suggested: results usually need to cover the whole query, and the terms generally need to appear in a reasonably tight window somewhere on the page.
3. Typeahead is intentionally prefix-friendly
When you are still typing, Monocle treats the last positive term as a prefix. That helps unfinished queries like interior desi find interior design without making the whole query fuzzy.
Quoted phrases stay stricter, and excluded terms stay excluded.
4. Semantic matching is blended in carefully
Semantic matching is not allowed to bulldoze good keyword results.
- It is reduced or disabled for very short queries, highly exact queries, and cases where the keyword results already look strong.
- It is more useful for longer, clearer searches where lexical matching alone may be too narrow.
- A semantic-only result has to clear a higher bar than a result that also has good lexical support.
In other words: semantic matching is used as a helper, not as an excuse to guess.
5. Strong “known item” signals can jump a page up
If a query looks like a specific page, utility item, slug, or well-known label, Monocle can strongly favor the page that best fits that intent. This is why short “take me there” searches often feel more decisive than broad topic searches.
6. Sometimes Monocle would rather be cautious than bluff
For ambiguous short queries, or for exact-style searches that do not have a convincing anchor, Monocle may deliberately avoid acting overconfident. That can mean weaker expansion, stricter filtering, or no result rather than a bad result promoted to the top.