What does an inverted index do in a search engine?
An inverted index is the core data structure of full-text search. Instead of scanning every document for a query term (slow), it precomputes a mapping from term → list of documents containing it (a "postings list"). To answer a query, the engine looks up each term and intersects/unions the postings lists. It is called "inverted" because it inverts the natural document→terms relationship into terms→documents. Lucene, Elasticsearch, and most search systems are built on this structure, often augmented with term frequencies and positions for ranking and phrase queries.
2 / 5
What does TF-IDF measure?
TF-IDF scores how important a term is to a specific document. Term Frequency rewards terms that appear often in the document. Inverse Document Frequency down-weights terms that appear in many documents (like "the" or "data") because they are not distinctive. Multiplying them gives high scores to terms that are frequent here but rare elsewhere — exactly the terms that characterize a document. It is a foundational relevance signal, though modern engines build on its successor BM25 and increasingly combine it with semantic vector signals.
3 / 5
What is BM25 and why is it preferred over plain TF-IDF?
BM25 (Best Matching 25) is the de facto standard lexical ranking function. It improves on TF-IDF in two key ways: saturation — additional occurrences of a term yield diminishing returns (the 50th occurrence does not matter as much as the 5th), and length normalization — it accounts for document length so long documents do not unfairly score higher just by containing more words. Tunable parameters (k1, b) control these effects. It is the default scoring in Elasticsearch/Lucene and the strong baseline that semantic search is measured against.
4 / 5
What is the difference between dense (vector) retrieval and sparse (lexical) retrieval?
Sparse (lexical) retrieval — BM25, keyword matching — represents text as high-dimensional sparse vectors of term weights and matches on shared terms. It is precise for exact terms but misses synonyms and paraphrases ("car" vs "automobile"). Dense retrieval embeds queries and documents into low-dimensional vectors via a neural model, then finds nearest neighbors by similarity (e.g. cosine). It captures semantic meaning, matching related concepts without shared words, but can miss exact terms/rare entities. Hybrid search combines both for the best of each.
5 / 5
What is a "two-stage retrieval" (retrieve-then-rerank) architecture?
Two-stage retrieval balances speed and quality. The first stage (recall) uses a cheap method — BM25 or approximate nearest-neighbor vector search — to quickly narrow millions of documents to a few hundred candidates. The second stage (rerank) applies a more expensive, more accurate model (often a cross-encoder that jointly reads query and document) to reorder just those candidates. This is efficient because the expensive model only scores a small set. It is the standard architecture for high-quality search and RAG retrieval pipelines.
What does the "Search Engine Ranking" vocabulary exercise cover?
This exercise tests real IT vocabulary related to search engine ranking through 5 multiple-choice questions, each built from realistic workplace sentences rather than abstract definitions.
Is this vocabulary exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is completely free — no account, sign-up, or payment required.
How many questions does this exercise have?
This exercise has 5 questions. Each one shows a real-world sentence or scenario with multiple-choice options and an explanation once you answer.
What happens after I answer a question?
You'll see immediate feedback showing whether your answer was correct, along with a short explanation of why — then a button to move to the next question, and a full results screen at the end.
Can I retry the exercise if I get questions wrong?
Yes. Once you reach the results screen, click "Try again" to reset your answers and go through the exercise from the start as many times as you like.
Do I need to create an account to take this exercise?
No account is needed. Your answers are scored in your browser during the session — nothing is saved to a server, so you can jump straight in.
Is my progress saved if I leave the page?
No — progress within an exercise resets if you navigate away or reload. Each exercise is short enough to complete in a few minutes in one sitting.
Are these vocabulary exercises connected to other topics?
Yes — browse the full vocabulary exercises hub to find related modules covering adjacent IT topics and roles.
How is this different from reading a glossary or blog article?
Exercises like this one are active recall drills — you have to choose the correct term or phrasing yourself, which builds retention faster than passively reading a definition.
Where can I find more vocabulary exercises?
Browse the full Vocabulary exercises hub for hundreds of modules covering Agile, DevOps, security, databases, architecture, and more — organised by IT role and skill.