views:

51

answers:

1

Hi

I am trying to use fts in my sqlite database, i have created a database and inserted ,all the records ,using sqlite query in my mac terminal, and used it in my iphone xcode project ,its worked fine.

now i am trying to integrate fts3 using the links

http://pp.hillrippers.ch/blog/2009/08/08/Static+SQLite+Library+with+Unicode+Support+for+the+iPhone/

http://regularrateandrhythm.com/regular-rate-rhythm-blog/sqlite3-fts-in-IOS4.html

http://answers.oreilly.com/topic/1955-how-to-use-full-text-search-in-sqlite/

http://longweekendmobile.com/2010/06/16/sqlite-full-text-search-for-iphone-ipadyour-own-sqlite-for-iphone-and-ipad/

according to these links if i try to create a sqlite fts query

i cannot execture this query in mac terminal

CREATE VIRTUAL TABLE table_name USING FTS3 ( col1);

can any please give me a good tutorial link, or solutions, how to deal with these fts.

Thanks in advance,

A: 

You are probably using a version of Sqlite on your desktop machine that is not compiled with FTS3 enabled. You need to compile a local version on your development machine to enable you to create the FTS.

The instructions on the Long Weekend website also explain how to build sqlite on your desktop with the FTS3 module turned on :

http://longweekendmobile.com/2010/06/16/sqlite-full-text-search-for-iphone-ipadyour-own-sqlite-for-iphone-and-ipad/

My workflow for creating FTS files for iPhone is as follows:

  1. Install sqlite with FTS3 on my OS X dev machine
  2. Execute the FTS create commands, etc via sqlite's command line interface
  3. Move the ready made DB file to my Xcode project
  4. Run on simulator or device using statically linked sqlite binary

That's it. The instructions on the Long Weekend website should work as described, they did for me, which is why I wrote em that way grin

crunchyt