Text gets indexed in another database every time a note gets saved/deleted/created. There might be better solutions with AWS Athena but using a simple MySQL database was by far the easiest (and quickest in terms of querying) way to add full text search. My database is paid via usage so I don't have to spend much money, if any, to index my notes.