Concepts
Ranking Signals
Use measurable document, query, freshness, and engagement signals to order search results by usefulness instead of returning raw matches.
Concepts Covered
- Candidate retrieval vs ranking
- Text relevance
- Freshness signals
- Engagement signals
- Quality and safety filters
- Personalization
- Ranking tradeoffs
Definition
Ranking signals are measurable pieces of information used to order search results.
An inverted index can find candidate documents that match a query. Ranking decides which of those candidates should appear first.
For a social search query like database sharding, possible signals include:
- whether the words appear in the post
- whether they appear as hashtags
- how recent the post is
- whether the author is trusted or relevant
- whether the post has engagement
- whether the viewer follows or interacts with the author
- whether the post violates safety or quality rules
The Pain That Forces Ranking
Raw text matching is not enough.
If a search engine returns every matching post in database order, the user sees noise. Very old posts may outrank current event posts. Spam may outrank useful content. A post that mentions a term once may appear above a post that is deeply about the topic.
Ranking exists because matching is only the first step. The product needs useful results, not merely matching results.
Mental Model
Search usually has two stages:
retrieve candidates -> rank candidates
Candidate retrieval should be broad enough to avoid missing good results. Ranking should be selective enough to put the best results at the top.
The retrieval layer asks, "What could match?"
The ranking layer asks, "What should the user see first?"
Common Signal Families
Text relevance:
- exact term match
- term frequency
- phrase match
- field match, such as username, hashtag, title, or body
Freshness:
- document age
- recency of engagement
- whether the query is trending or time-sensitive
Engagement:
- likes, replies, reposts, clicks, dwell time
- engagement velocity
- spam-adjusted engagement quality
Viewer context:
- language
- region
- follow graph
- blocked or muted accounts
- previous interactions
Safety and quality:
- spam score
- abuse state
- visibility restrictions
- duplicate or low-quality content
Tradeoffs
Ranking creates product power and engineering complexity.
More signals can improve relevance, but they also create:
- more data dependencies
- more stale feature problems
- more privacy and policy constraints
- more debugging difficulty
- more latency pressure
For real-time search, freshness may compete with rich ranking. A brand-new post may not have many engagement features yet. The system must decide how much to trust text relevance and freshness before slower features arrive.
Operational Reality
Important signals:
- ranking latency
- candidate count before ranking
- feature availability
- stale feature rate
- result click-through
- query reformulation rate
- safety filter rate
- freshness of top results
Knowledge links
Use these links to understand what to know first, where this idea appears, and what to study next.
Used In Systems
System studies where this idea appears in context.
Related Concepts
Core ideas that connect to this topic.