Ebook search functionality

I am trying to create an interactive book using corona and kwik.Then i have to add search functionality in to ebook.so i need to create it from scratch. my question is, how do I do it? because technically since every word in the book need to be searchable, do I need to add all the words in the ebook into a database or I can do the search function without use of database?