2

We are trying to scope out a project that has a relatively sophisticated search function. For instance it needs to search variations of words -- with "legal" and "legally" treated the same.

I believe the SQLite full-text extensions (FTS3, FTS4) will do everything we need, but I don't know if that's an option. Has anyone successfully used SQLite with FTS3 or FTS4 in a PhoneGap application?

If not, does anyone know of any robust alternatives that will work in PhoneGap?

David Hammond
  • 3,286
  • 1
  • 24
  • 18

1 Answers1

1

The default sqlite build in iOS does not support FTS. You have compile your own version with support for FTS3/FTS4 and include it in your project. Then, in PhoneGap, use an SQLite plugin and you have a SQLite DB with FTS.

Vlad Stirbu
  • 1,732
  • 2
  • 16
  • 27
  • I see. That makes sense (or as much as it could make sense without experience compiling a custom version of SQLite in PhoneGap). A couple questions: 1) have you actually done this (with FTS), or is this theoretical? 2) would I still be able to use the online PhoneGap Build service (I'm guessing not). – David Hammond Feb 27 '13 at 13:56
  • 1) Yes, I have done it. It was actually simpler than initially thought. You have to include the SQLite amalgamation in your project. A good starting point is [here](http://stackoverflow.com/questions/823706/compiling-custom-sqlite-for-an-iphone-app). Then you have to enable the Build Settings, Preprocessor Settings SQLITE_ENABLE_FTS3. 2) No, you won't be able to use the PhoneGap Build service. – Vlad Stirbu Feb 27 '13 at 14:30