Skip to content
About
Main content

What text search forbids

You cannot simultaneously have exact global top-k ordering, sub-second visibility, an arbitrary scoring function, and exact faceting at low cost. Each pair is fine; the set is not. Specifically:

  • order costs positions proportional to tokens;
  • a non-decomposable score costs all skipping;
  • cost a forward copy and cancel top-k ;
  • freshness costs segment count, and therefore per-query fixed work;
  • global score statistics cost a coordination round.

The escapes and their prices

EscapeWhat it buysPrice
Multi-stage retrievalmakes an arbitrary scoring function affordable by confining it to a few hundred candidatesa hard ceiling set by the cheap stage, and a tuning surface with no closed form
Precomputation (n-grams, materialized facet aggregates, multiple analyzed fields)converts read work into write work and spacevocabulary or index-size blow-up
Approximation of facet countsbuys facet aggregation backtwo-sided error, licensed only because facet counts are advisory (the candidate-generation approximations in search are one-sided by necessity)
Local IDFbuys away a coordination roundsilent, unmeasurable score inconsistency