---
answer: direct
beat: system-design
source: 1 article · updated: August 11, 2026
---

What is an AND-query and how does it use multiple posting lists?

An AND-query finds documents containing all terms (e.g., 'python' AND 'testing'). Fetch the posting lists for each term and intersect them—iterate the smallest list, checking membership in the others. If the posting lists are sorted, you can merge them in O(n + m) time without a hash table.

Answered in

The Inverted Index

A sorted dictionary mapping terms to document IDs. Transform search from O(corpus size) to O(1) lookup, enabling full-text search at scale.

Crashtech Editorial August 11, 2026 System Design

Read the full analysis

Other questions this article answers

More system design questions

Every answer on Crashtech is written by the editor of the article it comes from — never auto-summarised. Browse all answers or the System Design beat.