Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!