Skip to main content
Sort Relevance stage showing document reordering by relevance scores
The Sort Relevance stage reorders documents based on their relevance scores from previous stages. This is useful when documents have been modified or filtered and need to be re-sorted by their original search scores.
Stage Category: SORT (Reorders documents)Transformation: N documents → N documents (reordered by relevance)

When to Use

When NOT to Use

Parameters

Configuration Examples

How It Works

  1. Extract Scores: Read the score field from each document
  2. Sort: Order documents by score (descending by default)
  3. Optionally Normalize: Scale scores to 0-1 range
  4. Return: Documents in new order

Output Schema

Performance

Common Pipeline Patterns

Search + Filter + Re-sort

Multi-Stage with Score Normalization

Comparison with Other Sort Stages

Error Handling