Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Intersection algorithm, and skip pointers When searching a two - word query, the following two postings lists are returned from the inverted index: [ 2

Intersection algorithm, and skip pointers
When searching a two-word query, the following two postings lists are returned from
the inverted index:
[2,13,18,23,45,78,88,90,123,178,245,269,290,313,389,390]
[2,313]
a. List all the comparison pairs when using the standard postings lists
b. To speed up the intersection between the postings lists, skip pointers are
considered to add to the postings listings. Suppose the skip length is (P is the
length of the postings list)
a. Add the skip pointers to the first postings list
b. After the skip pointers are added to the first postings list, list all the
comparison pairs
2. Positional Indexes
Consider the following documents:
Doc 1: new home sales top forecast
Doc 2: home sales rise in july
a. Build positional indexes on top of these documents using the format DocID:
<(position1, position2),...>. For example, the positional index for the word
sales is as follows:
sales: 1:<3>; 2: <2>
b. A phrase query word1 word2 retrieves the occurrences where word1 is
immediately followed by word2. A /k query word1/k word2(k is a posi@ve integer)
retrieves the occurrences of word1 within k words of word2 on either side. For
example, k =1 demands that word1 be adjacent to word2, but word1 may come
either before or aHer word2.
For the following queries, return all the docs and corresponding posi@ons for which
the query condi@ons are met. If none of the documents meet the criteria, return
None.
i.new sales
ii.new home
iii. new /2 sales

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2014 Integration Services

Authors: Brian Knight, Devin Knight

1st Edition

1118850904, 9781118850909

More Books

Students also viewed these Databases questions