Chapter 2. Data Structures for Search
At the core of every fast, intelligent hybrid search and retrieval engine is a sophisticated arrangement of data structures grounded in computer science theory and practice. These structures transform a user’s imprecise query into a ranked, relevant set of results within milliseconds, even when searching billions of documents. While search often feels easy and instant, the underlying technology depends on indexes, graphs, bitmaps, and trees engineered for maximum speed and scale, as illustrated in Figure 2-1. This chapter examines these core components, explains how they operate, highlights their importance, and discusses the trade-offs that influence their design.
Figure 2-1. Components of a modern Search Engine
We begin with traditional search foundations: inverted indexes and term dictionary structures, which support keyword retrieval, along with postings ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access