Query processing: optimizations Paolo Ferragina Dipartimento di Informatica Università di Pisa Reading 2.3.

Slides:



Advertisements
Similar presentations
Information Retrieval in Practice
Advertisements

Latent Semantic Indexing (mapping onto a smaller space of latent concepts) Paolo Ferragina Dipartimento di Informatica Università di Pisa Reading 18.
Srihari-CSE535-Spring2008 CSE 535 Information Retrieval Lecture 2: Boolean Retrieval Model.
Introduction to Information Retrieval Introduction to Information Retrieval Introducing Information Retrieval and Web Search.
The term vocabulary and postings lists
Indexing UCSB 290N. Mainly based on slides from the text books of Croft/Metzler/Strohman and Manning/Raghavan/Schutze All slides ©Addison Wesley, 2008.
Parametric search and zone weighting Lecture 6. Recap of lecture 4 Query expansion Index construction.
INFO 624 Week 3 Retrieval System Evaluation
Information Retrieval IR 4. Plan This time: Index construction.
1 CS 430: Information Discovery Lecture 4 Data Structures for Information Retrieval.
Introduction to Information Retrieval Introduction to Information Retrieval Hinrich Schütze and Christina Lioma Lecture 7: Scores in a Complete Search.
Index Construction: sorting Paolo Ferragina Dipartimento di Informatica Università di Pisa Reading Chap 4.
IR Paolo Ferragina Dipartimento di Informatica Università di Pisa Reading Chapter 1 Many slides are revisited from Stanford’s lectures by P.R.
Web Search – Summer Term 2006 II. Information Retrieval (Basics) (c) Wolfgang Hürst, Albert-Ludwigs-University.
Data Structures Using C++ 2E Chapter 9 Searching and Hashing Algorithms.
PrasadL3InvertedIndex1 Inverted Index Construction Adapted from Lectures by Prabhakar Raghavan (Yahoo and Stanford) and Christopher Manning (Stanford)
Introducing Information Retrieval and Web Search
Basics of Data Compression Paolo Ferragina Dipartimento di Informatica Università di Pisa.
LIS618 lecture 2 the Boolean model Thomas Krichel
Query processing: optimizations Paolo Ferragina Dipartimento di Informatica Università di Pisa Reading 2.3.
Data Structures & Algorithms and The Internet: A different way of thinking.
Recap Preprocessing to form the term vocabulary Documents Tokenization token and term Normalization Case-folding Lemmatization Stemming Thesauri Stop words.
Search - on the Web and Locally Related directly to Web Search Engines: Part 1 and Part 2. IEEE Computer. June & August 2006.
Chapter 6: Information Retrieval and Web Search
8.1 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Paging Physical address space of a process can be noncontiguous Avoids.
Web Search Algorithms By Matt Richard and Kyle Krueger.
Efficient Instant-Fuzzy Search with Proximity Ranking Authors: Inci Centidil, Jamshid Esmaelnezhad, Taewoo Kim, and Chen Li IDCE Conference 2014 Presented.
IR Paolo Ferragina Dipartimento di Informatica Università di Pisa.
Introduction to Information Retrieval Introduction to Information Retrieval CS276 Information Retrieval and Web Search Pandu Nayak and Prabhakar Raghavan.
Index Construction: sorting Paolo Ferragina Dipartimento di Informatica Università di Pisa Reading Chap 4.
1. L01: Corpuses, Terms and Search Basic terminology The need for unstructured text search Boolean Retrieval Model Algorithms for compressing data Algorithms.
1 Information Retrieval LECTURE 1 : Introduction.
Information Retrieval and Web Search Boolean retrieval Instructor: Rada Mihalcea (Note: some of the slides in this set have been adapted from a course.
Chapter. 3: Retrieval Evaluation 1/2/2016Dr. Almetwally Mostafa 1.
Index construction: Compression of postings Paolo Ferragina Dipartimento di Informatica Università di Pisa Reading 5.3 and a paper.
Document Parsing Paolo Ferragina Dipartimento di Informatica Università di Pisa.
Introduction to Information Retrieval Introducing Information Retrieval and Web Search.
CS315 Introduction to Information Retrieval Boolean Search 1.
Index construction: Compression of postings
Why indexing? For efficient searching of a document
Prof. Paolo Ferragina, Algoritmi per "Information Retrieval"
Query processing: optimizations
Large Scale Search: Inverted Index, etc.
Information Retrieval in Practice
Module 11: File Structure
Text Indexing and Search
CS122B: Projects in Databases and Web Applications Winter 2017
Indexing UCSB 293S, 2017 Mainly based on slides from the text books of Croft/Metzler/Strohman and Manning/Raghavan/Schutze All slides ©Addison Wesley,
Lecture 1: Introduction and the Boolean Model Information Retrieval
Prof. Paolo Ferragina, Algoritmi per "Information Retrieval"
Query processing: phrase queries and positional indexes
Text Based Information Retrieval
Query processing: phrase queries and positional indexes
Implementation Issues & IR Systems
MG4J – Managing GigaBytes for Java Introduction
Prof. Paolo Ferragina, Algoritmi per "Information Retrieval"
Index Construction: sorting
CS122B: Projects in Databases and Web Applications Winter 2017
Prof. Paolo Ferragina, Algoritmi per "Information Retrieval"
Boolean Retrieval.
Information Retrieval and Web Search Lecture 1: Boolean retrieval
Information Retrieval
Lectures 4: Skip Pointers, Phrase Queries, Positional Indexing
Introducing Information Retrieval and Web Search
INFORMATION RETRIEVAL TECHNIQUES BY DR. ADNAN ABID
Query processing: phrase queries and positional indexes
Introducing Information Retrieval and Web Search
Information Retrieval and Web Design
INFORMATION RETRIEVAL TECHNIQUES BY DR. ADNAN ABID
Introducing Information Retrieval and Web Search
Presentation transcript:

Query processing: optimizations Paolo Ferragina Dipartimento di Informatica Università di Pisa Reading 2.3

Augment postings with skip pointers (at indexing time) How do we deploy them ? Where do we place them ? Sec. 2.3

Using skips Suppose we’ve stepped through the lists until we process 8 on each list. We match it and advance. We then have 41 and 11 on the lower. 11 is smaller. But the skip successor of 11 on the lower list is 31, so we can skip ahead past the intervening postings. Sec. 2.3

Placing skips Tradeoff: More skips  shorter spans  more likely to skip. But lots of comparisons to skip pointers. Fewer skips  longer spans  few successful skips. Less pointer comparisons. 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. This definitely useful for in-memory index The I/O cost of loading a bigger list can outweigh the gains! Sec. 2.3

Placing skips, contd What if it is known a distribution of access p k to the k-th element of the inverted list? w(i,j) = sum k=i..j p k L^0(i,j) = average cost of accessing an item in the sublist from i to j = sum k=i..j p k * (k-i+1) L^1(1,n) = 1 (first skip cmp) + (cost to access the two lists) min u>1 w(1,u-1) * L^0(1,u-1) + w(u,n) * L^1(u,n) L^0(i,j) can be tabulated in O(n^2) time Computing L^1(i,n) takes O(n), given L^1(j,n), for j>i Computing the total L^1(1,n) takes O(n^2) time Sec. 2.3 You can solve it by Shortest Path

Placing skips, contd What if it is also fixed the number of p skip- pointers that can be allocated? Same as before but we add the parameter p L^1_p(1,n) = 1 + min_{u>1} w(1,u-1) * L^0(1,u-1) + w(u,n) * L^1_{p-1}(u,n) L^1_0(i,j) = L^0(i,j), i.e. no pointers left, so scan L^i(j,n) takes O(n) time [min calculation] if are available the values for L^{i-1}(h,n) with h > j So L^p(1,n) takes O(pn^2) time Sec. 2.3

Faster query = caching? Two opposite approaches: I. Cache the query results (exploits query locality) II. Cache pages of posting lists (exploits term locality)

Query processing: phrase queries and positional indexes Paolo Ferragina Dipartimento di Informatica Università di Pisa Reading 2.4

Phrase queries Want to be able to answer queries such as “stanford university” – as a phrase Thus the sentence “I went at Stanford my university” is not a match. Sec. 2.4

Solution #1: Biword indexes For example the text “Friends, Romans, Countrymen” would generate the biwords friends romans romans countrymen Each of these biwords is now an entry in the dictionary Two-word phrase query-processing is immediate. Sec

Longer phrase queries Longer phrases are processed by reducing them to bi-word queries in AND stanford university palo alto can be broken into the Boolean query on biwords, such as stanford university AND university palo AND palo alto Need the docs to verify + They are combined with other solutions Can have false positives! Index blows up Sec

Solution #2: Positional indexes In the postings, store for each term and document the position(s) in which that term occurs: <term, number of docs containing term; doc1: position1, position2 … ; doc2: position1, position2 … ; etc.> Sec

Processing a phrase query “to be or not to be”. to: 2:1,17,74,222,551; 4:8,16,190,429,433; 7:13,23,191;... be: 1:17,19; 4:17,191,291,430,434; 5:14,19,101;... Same general method for proximity searches Sec

Query term proximity Free text queries: just a set of terms typed into the query box – common on the web Users prefer docs in which query terms occur within close proximity of each other Would like scoring function to take this into account – how? Sec

Positional index size You can compress position values/offsets Nevertheless, a positional index expands postings storage by a factor 2-4 in English Nevertheless, a positional index is now commonly used because of the power and usefulness of phrase and proximity queries … whether used explicitly or implicitly in a ranking retrieval system. Sec

Combination schemes BiWord + Positional index is a profitable combination Biword is particularly useful for particular phrases (“Michael Jackson”, “Britney Spears”) More complicated mixing strategies do exist! Sec

Soft-AND E.g. query rising interest rates Run the query as a phrase query If <K docs contain the phrase rising interest rates, run the two phrase queries rising interest and interest rates If we still have <K docs, run the “vector space query” rising interest rates (…see next…) “Rank” the matching docs (…see next…) Sec