Modern Search: The Basics

Episode #334 • Aug 11, 2025 • Subscriber-Only

Search is a natural feature to add to an app once your user has stored a whole bunch of data. We will tackle the problem from the perspective of modern persistence using SQLite as your data store by adding a simple search feature to our rewrite of Apple’s Reminders app.

Previous episode
Modern Search: The Basics
Next episode
Locked

Unlock This Episode

Our Free plan includes 1 subscriber-only episode of your choice, plus weekly updates from our newsletter.

Sign in with GitHub

Introduction

Brandon

We have spent the past many weeks diving into topics related to what we like to call “Modern Persistence.” In those episodes we uncovered powerful techniques for persisting user data, querying data, observes changes to the data in views, reacting to database events with triggers, and we accomplished all of this with an eye on type-safety, schema-safety, and testability.

We are going to continue the theme of “Modern Persistence” for a little bit longer by exploring something that naturally comes up once your user has stored a whole bunch of data in your app: how can you efficiently search through it? Searching data sets is something that SQL excels at in general, but as your dataset gets large enough, or your search terms get complex enough, you need to start turning to other tools.

Stephen

One of the most popular tools out there for this is known as “full-text search”, which is a technique that has been codified in many storage systems, such as MySQL, Postgres, Elasticsearch, and of course our beloved SQLite. Full-text search allows you to efficiently process many thousands of documents to search for phrases with some fancy bells and whistles. For example, it can rank documents based on how relevant they are to the search term, and it comes with a simple query syntax for searching complex terms, and it can even help you generate fragments of your documents with search terms highlighted in order to display it to your users.

Brandon

We are going to cover most of this, but first let’s explore how we might approach searching our database from first principles. We are going to take the Reminders app that we have been building for multiple weeks, and we are going to add a search feature to it.

Let’s get started.

Stubbing a search feature


References

Downloads

Sample code

Get started with our free plan

Our free plan includes 1 subscriber-only episode of your choice, access to 73 free episodes with transcripts and code samples, and weekly updates from our newsletter.

View plans and pricing