Document Indexing in Information Retrieval:
Document Indexing in Information Retrieval:
Information Retrieval
Faster postings merges:
Skip pointers/Skip lists
Sec. 2.3
2 4 8 41 48 64 128 Brutus
2 8
1 2 3 8 11 17 21 31 Caesar
Can we do better?
Yes (if index isn’t changing too fast).
Sec. 2.3
11 31
1 2 3 8 11 17 21 31
• Why?
• To skip postings that will not figure in the
search results.
• How?
• Where do we place skip pointers?
Sec. 2.3
Placing skips
• Simple heuristic: for postings of length L, use L evenly-
spaced skip pointers.
• This ignores the distribution of query terms.
• Easy if the index is relatively static; harder if L keeps
changing because of updates.
Phrase queries
We want to be able to answer queries such as “stanford university” – as
a phrase
Thus the sentence “I went to university at Stanford” is not a match.
The concept of phrase queries has proven easily understood by users; one of the
few “advanced search” ideas that works
Many more queries are implicit phrase queries
For this, it no longer suffices to store only
<term : docs> entries
Introduction to Information Retrieval Sec. 2.4.1
Without the docs, we cannot verify that the docs matching the above
Boolean query do contain the phrase.
Biword indexes are not the standard solution (for all biwords) but can be
part of a compound strategy
Introduction to Information Retrieval Sec. 2.4.2
<be: 993427;
1: 7, 18, 33, 72, 86, 231; Which of docs 1,2,4,5
2: 3, 149; could contain “to be
4: 17, 191, 291, 430, 434; or not to be”?
5: 363, 367, …>
Proximity queries
LIMIT! /3 STATUTE /3 FEDERAL /2 TORT
Again, here, /k means “within k words of”.
Clearly, positional indexes can be used for such queries; biword indexes
cannot.
Exercise: Adapt the linear merge of postings to handle proximity
queries. Can you make it work for any value of k?
This is a little tricky to do correctly and efficiently
See Figure 2.12 of IIR
Introduction to Information Retrieval Sec. 2.4.2
Rules of thumb
A positional index is 2–4 as large as a non-positional index
Combination schemes
These two approaches can be profitably combined
For particular phrases (“Michael Jackson”, “Britney Spears”) it is inefficient to
keep on merging positional postings lists
Even more so for phrases like “The Who”
Williams et al. (2004) evaluate a more sophisticated mixed indexing
scheme
A typical web query mixture was executed in ¼ of the time of using just a
positional index
It required 26% more space than having a positional index alone