iPhone: SQLite Fulltext Index

Most blogposts I found on this topic don’t explain it from the beginning, so it took me quite a while to figure out how simple and powerful the sqlite fulltext search API (FTS3) actually is.

  1. get the sqlite3 amalgamation sources (v3.6.22) and just unpack it into your iPhone project – sqlite3 as shipped on the iPhone doesn’t support FTS3,
  2. activate FTS3 support,
  3. create the index table programmatically inside your App as your Macs default sqlite3 doesn’t support FTS3 either,
  4. use it like any other table except using the MATCH operator for index queries.

That’s it, and it’s hell quick.

Flattr this!

Comments 1

  1. iphone application development india wrote:

    Hey,

    Thanks for sharing the information
    Cheers.

    Posted 18 Okt 2011 at 9:41 am

Trackbacks & Pingbacks 1

  1. From MRo Blog - Rank sql(ite) text search results on 05 Aug 2011 at 8:55 am

    […] take a simple example using the LIKE operator. (I know, FTS does a better job, but let’s stick to like for […]

Post a Comment

Your email is never published nor shared. Required fields are marked *