Implementing full text search on iPhone?

Posted by Nimrod on Stack Overflow See other posts from Stack Overflow or by Nimrod
Published on 2010-01-10T04:51:19Z Indexed on 2010/04/27 2:33 UTC
Read the original article Hit count: 372

Filed under:
|
|
|
|

I'm looking for suggestions on the best way to implement a full-text search on some static data on the iPhone.

Basically I have an app that contains the offline version of a web site, about 50MB of text, and I'd like for users to be able to search for terms. I figure that I should somehow build an table of ("word", reference_to_file_containing_word) or something, put that into either Core Data or just sqlite, index the "word" column, then have the search facility search the table for search terms and take the intersection of the sets of results for the terms or something.

That wouldn't allow people to search for phrases but it would be pretty easy and probably not too slow.

I'd like to just use existing SDK features for this. Should I use Core Data or sqlite?

Does anyone have any other ideas on how this could be done?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about core-data