The search functionality of our reminders app is really starting to shine. Not only are we using SQLite’s FTS5 module to provide advanced searching capabilities, including ranking, term highlighting and term snippets, but we are even able to leverage all of this work to make our queries more efficient across the board. Even for queries that have nothing to do with searching.
We’re getting close to the end of this series, and we’ve already covered so many things that we didn’t plan on when we started. But that’s just because of how incredible and powerful the FTS5 module is. And there’s still one more thing we want to cover.
It turns out that the text we feed to the MATCH
operator is not just a simple string, but has a query syntax all of its own. It supports logical operators, such as AND
, OR
and NOT
, it supports NEAR
searches so that if someone searches for “New York City” you can you require those all 3 of those words be somewhat near each other instead of scattered all about in the document. And more.
Let’s explore these powers and see how we can leverage them to build an advanced search interface into our reminders app.