infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Read Only Archives
Cloverleaf
Cloverleaf
Full-text Search with SQLite
Hai Nguyen
Hello,
Does SQLite that embedded in Cloverleaf have a feature Full-text search? if so what version of Cloverleaf?
I got SQL error when I tried to invoked the fts with Cloverleaf version 5.7:
sqlite> CREATE VIRTUAL TABLE data USING fts3();
SQL error: no such module: fts3
Thank you,
Hai Nguyen
Find more posts tagged with
Clovertech
Comments
Max Drown
Do you know what version of SQLite supports that function? Cloverleaf 6.1 embeds SQLite 3.7.10.
Charlie Bursell
Wrong syntax Hai. You have:
CREATE VIRTUAL TABLE data USING fts3();
Try it like this:
CREATE VIRTUAL TABLE docs USING fts3(title, body);
You have to define columns. Here is what I get
C:healthvisioncis5.8integratorlevel_3tclprocsLIB>sqlite test.db
SQLite version 3.6.4
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> CREATE VIRTUAL TABLE docs USING fts3(title, body);
sqlite> .schema
CREATE VIRTUAL TABLE docs USING fts3(title, body);
CREATE TABLE docs_content( docid INTEGER PRIMARY KEY,c0title,c1body);
CREATE TABLE docs_segdir( level integer, idx integer, start_block integer, leaves_end_block integer, end_block integer, root blob, primary key(level, idx));
CREATE TABLE docs_segments( blockid INTEGER PRIMARY KEY, block blob);
sqlite>
System
Originally posted by Kevin Kinnell
I don't think he had it wrong, Charlie.
Hai Nguyen
Hello,
Yup, I learn the fts feature from
https://www.sqlite.org/fts3.html#section_1_2
and like to try it out.
I have no luck following Charlie's and Kevin's suggestion, I always use command "sqlite3" for SQLite.
$ sqlite3 test.db
SQLite version 3.6.4
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> CREATE VIRTUAL TABLE docs USING fts3(title, body);
SQL error: no such module: fts3
sqlite> .q
$ sqlite3 foo
SQLite version 3.6.4
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> create virtual table bar using fts3;
SQL error: no such module: fts3
sqlite> .q
Max, I have SQLite version 3.6.4, which is embedded in our CLV 5.7. Don't know why it works for Charlie on the same version with mine.
System
Originally posted by Kevin Kinnell
Ah. So you are logged in as a cloverleaf user on a unix-like system. In that case, you should NOT use sqlite3.
When you logged in with all of the setup associated with being a
Cloverleaf user
, you use
sqlite
to access Cloverleaf related SQLite stuff. If you wanted to access your system's sqlite shell, you'd probably use
sqlite3
(or an absolute path.)
### 'which' shows the difference: I'm logged in as a Cloverleaf user ###
$ which sqlite
/opt/cloverleaf/cis6.0/integrator/tcl/bin/sqlite
$ which sqlite3
/usr/bin/sqlite3
If you're on RedHat, it's very likely that the Cloverleaf SQLite is ahead of your system SQLite, possibly by as much as a version number!
Hai Nguyen
Thanks for quick response and suggestion Kevin.
I got the same error with both log-in sessions Unix and Cloverleaf user, and there is only "sqlite3" on both sessions.
### Logged in as an Unix user:
$ which sqlite
which: no sqlite in (/bin:/usr/bin:/usr/ucb:/etc:/opt/sfw/bin:/hci:/hci/bin:/hci/kshlib:/usr/local/bin:.)
$ which sqlite3
/usr/bin/sqlite3
$ sqlite3 foo
SQLite version 3.3.6
Enter ".help" for instructions
sqlite> create virtual table bar using fts3;
SQL error: near "virtual": syntax error
### Logged in as a Cloverleaf user:
$ which sqlite
/usr/bin/which: no sqlite in (/hci/qdx5.7/integrator/...)
$ which sqlite3
/hci/qdx5.7/integrator/tcl/bin/sqlite3
$ sqlite3 foo
SQLite version 3.6.4
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> create virtual table bar using fts3;
SQL error: no such module: fts3
My Linux version is:
Red Hat Enterprise Linux Server release 5.9 (Tikanga)
Kernel 2.6.18-348.3.1.el5 on an x86_64
System
Originally posted by Kevin Kinnell
Okay, I'm flummoxed. I wonder if the SQLite in cl 5.7 was compiled without fts3? It's a config switch to the compiler, and it's not automatic. fts3 has been there since SQLite 3.5, but I don't know when it started being the default in Cloverleaf.
Max or Charlie?
Charlie Bursell
What Cloverleaf version Hai? We do not install sqlite under the /usr directory.
If I run: 'which sqlite' on my Linux box, I get
/hci/cis6.0/integrator/tcl/bin/sqlite
Check under $HCIROOT/tc/bin
As for when the fts was compiled in, I don't know since I have never had a reason to use it. I have versions back to 5.8 and it is there. If you are still running 5.7 you are well overdue for an upgrade
Hai Nguyen
Only sqlite3 installed on my box:
$ which sqlite3
/hci/qdx5.7/integrator/tcl/bin/sqlite3
$ which sqlite
/usr/bin/which: no sqlite in (/hci/qdx5.7/integrator/...)
I have to wait until our current 5.7 upgrading to CLV version 6 then :P
Thank you all for your help and check!