Modelintro
Boolean retrieval model
Also called exact-match retrieval.
A query is a Boolean expression of terms, and a document is returned when it satisfies the expression, with no ranking.
In the Boolean retrieval model a query is an expression of terms joined by AND, OR and NOT, and the answer is the set of documents that satisfy it. Each document counts only as the set of its terms, which is one column of the term-document incidence matrix. An engine evaluates the query with set operations on the posting lists of an inverted index, mostly by intersection. A document either matches or does not match, so the model gives no order among the documents it returns.
The machine
Documents and queries. Let be a collection and its vocabulary. Each document is reduced to its set of terms , so the number of occurrences and the order of words are lost. A query is a formula built from terms by the grammar
Meaning. The answer is defined by induction on the formula:
Read as logic, each term is a propositional variable that is true for when , and is in when the formula is true for . The answer is a set, and an engine returns it in some fixed order, such as document id or date, which the model does not define.
Evaluation on an index. is the posting list of , sorted by document id. AND is a merge intersection of two sorted lists, OR is a merge union, and AND NOT is a merge difference. Each step of a merge costs one comparison and reads one posting. A bare NOT needs the list of all ids, so engines accept NOT only inside an AND. For a conjunction of terms, a good order intersects the lists in order of increasing document frequency , so that each intermediate result is at most the size of the shortest list (Manning, Raghavan and Schuetze, Section 1.3).
Example. In the toy collection of the information retrieval pages, , tokens are the lower-case words split on spaces, and there is no stemming. Six posting lists:
| term | posting list | |
|---|---|---|
| sorted | 4 | 1, 2, 4, 8 |
| array | 3 | 1, 2, 8 |
| search | 2 | 1, 7 |
| posting | 3 | 3, 4, 5 |
| list | 2 | 3, 4 |
| merge | 2 | 2, 5 |
- sorted AND array gives .
- sorted AND array AND search starts with the shortest list, search . Its intersection with array gives , and the intersection with sorted keeps .
- sorted AND NOT array gives .
- posting OR merge gives .
- posting AND list AND merge gives the empty set, although is "skip pointers speed up the merge of two posting lists". The token "lists" is not the term "list". With a stemmer that maps both words to "list", the answer is .
The query sorted AND array returns , and with no order among them, while a ranking model such as BM25 puts first because it also contains "search".
What it counts
- Answer set. The output is a set. Its quality is measured by the precision and recall of that set against the relevance judgments, not by measures of a ranked list.
- Postings read. The main cost of evaluation is the number of postings read and compared. A merge of lists of lengths and reads at most postings. Skip pointers let a merge jump over runs of postings, and with galloping search an intersection of lists of lengths takes comparisons.
- Size of the answer. The model gives no control over . Adding a term with AND can only shrink the answer, and adding a term with OR can only grow it. On a large collection the user must often rewrite a query many times to get an answer that is neither empty nor too large.
Relation to other models
- Incidence matrix. On the term-document incidence matrix, AND, OR and NOT are the bitwise operations on the rows of the terms, and the answer is the set of columns with a 1. This is the dense form of the same model.
- Vector space model. The vector space model gives each document a score and ranks all documents, so a document that misses one query term can still rank high. The extended Boolean model of Salton, Fox and Wu (1983) joins the two: an AND or OR of weighted terms has a -norm score. At the score is the strict Boolean answer, and at it is proportional to an inner product of weights.
- Coordination level matching. Counting how many query terms a document contains, and ranking by that count, is the simplest bridge from Boolean matching to ranking. The binary independence model with equal term weights gives this order.
- Boolean filter with ranking. Many engines first apply a Boolean condition, often an AND of the query terms or a set of required fields, and then rank the documents that pass with a score such as BM25. Dynamic pruning methods such as WAND evaluate the ranked part.
- Positions. A phrase query or a proximity condition is not a Boolean expression of terms, because it depends on the order of words. It needs a positional index.
- Propositional logic. Every query is a propositional formula, and every propositional formula over the terms is a query. It can be rewritten in conjunctive normal form, an AND of ORs, which some professional search systems used as their query form.
Known results in the model
- Every set condition is a query. AND, OR and NOT are functionally complete, so every condition on which terms a document contains, and on which it does not contain, is expressed by some query.
- Query satisfiability and equivalence. Every truth assignment of the terms is the term set of some possible document. So a query has a nonempty answer on some collection exactly when its formula is satisfiable, which is NP-complete to decide. Two queries give the same answer on every collection exactly when their formulas are equivalent, which is coNP-complete.
- Evaluation cost. With posting lists, an AND of terms costs by merging, and processing the terms in order of increasing keeps every intermediate list no longer than the shortest one. See posting-list intersection for the adaptive bounds.
- Use in practice. Boolean search with extensions such as proximity operators and truncation was the main form of commercial and library search before ranked retrieval. It is still used for legal, patent and systematic medical searches, where users want a precise and repeatable answer set (Manning, Raghavan and Schuetze, Chapter 1).
References
- Christopher D. Manning, Prabhakar Raghavan and Hinrich Schuetze, Introduction to Information Retrieval, Cambridge University Press, 2008, Chapter 1 (Boolean retrieval, the inverted index, Section 1.3 on the processing of Boolean queries and the order of terms by increasing document frequency, Section 1.4 on extended Boolean and ranked retrieval)
- Ricardo Baeza-Yates and Berthier Ribeiro-Neto, Modern Information Retrieval, second edition, Addison-Wesley, 2011, Chapter 3 (modeling, the Boolean model and its comparison with the vector and probabilistic models)
- Gerard Salton, Edward A. Fox and Harry Wu, Extended Boolean information retrieval, Communications of the ACM 26(11), 1022 to 1036, 1983, the p-norm model, which goes from strict Boolean matching at p equal to infinity to a vector inner product at p equal to 1
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag NAXKG5 Edit this page History Report an error Markdown