Comp4321 The Index May 14 2026

The anatomy of a top result.

query · film ghost dog samurai user · doc № 267
phrase ×3.0 title ×2.0 body match

Forward index · top stems on this page

film 21 ghost 16 dog 15 samurai 15 user 10 imdb 10 movi 9 great 9 rate 9 wai 8 plot 7 code 7 mafia 6 deep 6

document length 903 body tokens  ·  max tf 21 (film)  ·  vocabulary 549 distinct stems  ·  title 4 stems

Score breakdown

Re-derived from the same tf·idf cosine values, boost factors, and PageRank multipliers the live ranker just used. weighted = body + title × 2.0 · final = weighted × phrase × pagerank.

  1. cosine(query, body) tf·idf body · 5 resolved stems0.6814
  2. cosine(query, title) × 2.0 title boost ×2.0 applied1.9201
  3. weighted subtotal cosBody + 2.0 × cosTitle2.6015
  4. × phrase multiplier ≥2 stems within 5-token window×3.0
  5. × pagerank multiplier PageRank not computed for this page · ×1.0×1.0000
  6. final score weighted × phrase × pagerank7.8046

Per-query-stem · how each term contributes

  1. film wid 1258 · df 162 body tf 21 title tf 0 idf 0.889
  2. ghost wid 0587 · df 10 body tf 16 title tf 1 idf 4.907
  3. dog wid 0375 · df 13 body tf 15 title tf 1 idf 4.528
  4. samurai wid 0588 · df 3 body tf 15 title tf 1 idf 6.644
  5. user wid 1045 · df 289 body tf 10 title tf 0 idf 0.054

Outlinks (1)