Bird
0
0

Why does ts_rank sometimes assign the same rank to different documents even if their content differs?

hard📝 Conceptual Q10 of 15
PostgreSQL - Full-Text Search
Why does ts_rank sometimes assign the same rank to different documents even if their content differs?
ABecause it ignores word frequency
BBecause it uses a normalization factor that can cause ties
CBecause it only compares document length
DBecause it ranks documents randomly
Step-by-Step Solution
Solution:
  1. Step 1: Understand ts_rank normalization

    ts_rank applies normalization factors that can scale scores, sometimes causing ties.

  2. Step 2: Evaluate other options

    It does consider word frequency; does not rank randomly; length alone is not the only factor.

  3. Final Answer:

    Because it uses a normalization factor that can cause ties -> Option B
  4. Quick Check:

    Normalization causes ties = True [OK]
Quick Trick: Normalization can cause equal ranks for different docs [OK]
Common Mistakes:
  • Assuming ts_rank ignores frequency
  • Thinking ranking is random
  • Believing only length matters

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PostgreSQL Quizzes