Search engines as a digital solution

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Search engines as a digital solution

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. How does a search engine find pages so it can answer queries quickly?
A It crawls web pages and stores them in an index
B It searches the whole live web from scratch each time you type
2. What does a search engine do with the results it finds for a query?
A Shows them in a random order
B Ranks them so the most relevant appear first
3. Which one is the user's query?
A The words typed in to describe what they want to find
B The list of pages the search engine stores
4. Which describes the problem a search engine solves?
A Storing a user's personal files securely
B Finding useful information among billions of web pages
5. A student searches 'best phone' and the top results are paid adverts. What limit does this show?
A Bias: ranking can favour some pages over more useful ones
B The index has crashed

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1crawler AA search engine does not return pages randomly. It must rank results by relevance to the query so the user can find useful information.
2index BA stored database of words and the pages they appear on, so results can be found quickly
3The user's query is the words typed in to describe the information they want to find CA program that follows links from page to page to discover and collect web pages for the search engine
4Ranking sorts the matching pages so the most relevant results appear first DA top-ranked page is not always accurate or unbiased. Ranking can be affected by bias, paid adverts and poor relevance, so users must check sources.
5Search engine shows every page on the web in random order Eresults.sort(key=score, reverse=True)
6Top result = always the most accurate and unbiased page Fquery = "best study tips year 11"

Definitions

search engine

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
FOR EACH page IN web _____(page) index(page)
2.
FOR EACH word IN page.text ADD page TO index[____]
3.
query ← INPUT("Search: ") matches ← index[_____]
4.
SORT matches BY score __________ DISPLAY matches
5.
IF page.relevance _ 0.2 THEN REMOVE page FROM results

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A FOR each page IN crawl_list
B REMOVE words from index
C ADD links to crawl_list
Question 2
A FOR each page IN matches
B page.score ← relevance(page)
C END FOR
D SORT matches BY title DESC
Question 3
A OUTPUT 'Search for:'
B query ← INPUT()
C words ← LENGTH(query)
D results ← index.find(words)
Question 4
A score ← 0
B score ← score - matching_words
C RETURN score
Question 5
A FOR each result IN results
B IF result.relevant THEN
C HIDE result
D END IF

Answer Key

Search engines as a digital solution
Section A: Quick Questions
Q1
A — It crawls web pages and stores them in an index
Q2
B — Ranks them so the most relevant appear first
Q3
A — The words typed in to describe what they want to find
Q4
B — Finding useful information among billions of web pages
Q5
A — Bias: ranking can favour some pages over more useful ones
Section B: Match the Pairs
Q1
crawler → A program that follows links from page to page to discover and collect web pages for the search engine
Q2
index → A stored database of words and the pages they appear on, so results can be found quickly
Q3
The user's query is the words typed in to describe the information they want to find → query = "best study tips year 11"
Q4
Ranking sorts the matching pages so the most relevant results appear first → results.sort(key=score, reverse=True)
Q5
Search engine shows every page on the web in random order → A search engine does not return pages randomly. It must rank results by relevance to the query so the user can find useful information.
Q6
Top result = always the most accurate and unbiased page → A top-ranked page is not always accurate or unbiased. Ranking can be affected by bias, paid adverts and poor relevance, so users must check sources.
Section C: Definitions
Q1
search engine — A digital solution that solves the problem of finding information by indexing web pages and ranking the results for a user's query.
Section D: Fill in the Blanks
Q1
FOR EACH page IN web crawl(page) index(page)
Q2
FOR EACH word IN page.text ADD page TO index[word]
Q3
query ← INPUT("Search: ") matches ← index[query]
Q4
SORT matches BY score DESCENDING DISPLAY matches
Q5
IF page.relevance < 0.2 THEN REMOVE page FROM results
Section E: Spot the Error
Q1
B — Indexing adds the words found on each page to the index. Removing them would leave nothing to search. It should be ADD page words to index.
Q2
D — Results are ranked by the relevance score worked out in the loop, not by title. It should be SORT matches BY score DESC.
Q3
C — LENGTH gives a number, not a list of words, so index.find cannot use it. The query should be split into words with SPLIT(query, ' ').
Q4
B — Each matching word should raise a page's relevance score, so it must be added. Subtracting would rank the best matches lowest.
Q5
C — Relevant results should be shown to the user. Hiding them removes the useful pages. It should be DISPLAY result.