Actually, I’m creating a e-book application. It uses one table as a book content, on each row one page of the book. When I search for a word It should return some list of partial results for example:
page 14:
{some text} keyword {some text3 again}
page 17:
{some text2} keyword {some text2 again}
Of course, I can do it with some processing my text result in Java side, but I’m looking for better solution maybe with SQLite or another approach.
What technique is optimal in terms of CPU and memory usage?
Look into the FTS modules of SQLite.
snippetfunction does exactly what you want