0

I am trying to run a "match" query against a sqlite database from inside a corona app. I compiled the sqlite database from the source files using cl.exe and when I compiled I included the flags to enable the fts features. Then I created a virtual table in the database using fts3 (I also tried separately with fts4). I am able to run a "match" query from the sqlite command line utility and it returns the correct results.

However, when I try the same query against the same database file from my corona app, I get the error "no such module: fts3" (I got "no such module: fts4" when I tried with fts4). Other queries (not using full text search) work fine from within corona.

Can anyone tell me why I'm getting this error on full text searches in my corona app? The sqlite documentation implies that this error means that the sqlite build does not include the FTS modules. But I think I compiled it properly because my SQL statements to create an FTS3 table succeeded (outside of corona) and the full text query also works outside of corona.

Do I need to set something differently in my corona build settings or something?

I'm using the corona simulator on Windows, but I also tried it on my device.

Here is the output from adb logcat from my device:

I/Corona  (15353): Runtime error

I/Corona  (15353): no such module: fts3

I/Corona  (15353): stack traceback:

I/Corona  (15353):  [C]: ?

I/Corona  (15353):  [C]: in function 'nrows'

I/Corona  (15353):  ...t\Documents\Corona Projects\aw\scene_search.lua:162: in function 'fillMyTable'

I/Corona  (15353):  ...t\Documents\Corona Projects\aw\scene_search.lua:56: in function <...t\Documents\Corona Projects\aw\scene_search.lua:49>

I/Corona  (15353):  ?: in function <?:218>
Colonel Thirty Two
  • 23,953
  • 8
  • 45
  • 85
user2026318
  • 173
  • 1
  • 13
  • @ are you running on WIn64 ? you should have a look [here](https://www.autoitscript.com/autoit3/files/beta/autoit/archive/sqlite/) and replace your sqlite3.dll (python/DLLs) with a 64 version (sqlite_x64.dll). – mannaia Mar 24 '15 at 13:54
  • Thanks I am using Win64 but I was compiling it myself. – user2026318 Mar 24 '15 at 18:49

1 Answers1

0

I also posted this question on the corona forums and the corona staff confirmed that they use the standard build of sqlite for Android and it does not include support for full text searching. The standard build on iOS does includes support for fts, so it does work for iOS.
See: http://forums.coronalabs.com/topic/55683-is-coronas-sqlite-compiled-with-fts3-full-text-search-enabled/

user2026318
  • 173
  • 1
  • 13