Recently I read a similar example on CS50 course, to do fast search. It is simply a json request everytime a keyboard event is activated. For storage, either store it in memory for instant lookup table or use redis.
I ended up using Azure Table Storage and Azure Search on top of it as the index. The azure auto suggester works great. it allows you to mark different fields as Retrievable, searchable, filterable etc. pretty cool thing
https://cs50.harvard.edu/college/2018/fall/weeks/7/notes/ look for the example on WORDS