mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-09 13:06:14 +00:00
create 'notindexed' option in CREATE TABLE for sqlite < 3.8.0
This commit is contained in:
parent
280a9b4b71
commit
f332371dde
|
@ -61,7 +61,11 @@ class SeedDMS_SQLiteFTS_Indexer {
|
||||||
/* Make sure the sequence of fields is identical to the field list
|
/* Make sure the sequence of fields is identical to the field list
|
||||||
* in SeedDMS_SQLiteFTS_Term
|
* in SeedDMS_SQLiteFTS_Term
|
||||||
*/
|
*/
|
||||||
$sql = 'CREATE VIRTUAL TABLE docs USING fts4(title, comment, keywords, category, mimetype, origfilename, owner, content, created, notindexed=created, matchinfo=fts3)';
|
$version = SQLite3::version();
|
||||||
|
if($version['versionNumber'] >= 3008000)
|
||||||
|
$sql = 'CREATE VIRTUAL TABLE docs USING fts4(title, comment, keywords, category, mimetype, origfilename, owner, content, created, notindexed=created, matchinfo=fts3)';
|
||||||
|
else
|
||||||
|
$sql = 'CREATE VIRTUAL TABLE docs USING fts4(title, comment, keywords, category, mimetype, origfilename, owner, content, created, matchinfo=fts3)';
|
||||||
$res = $index->_conn->exec($sql);
|
$res = $index->_conn->exec($sql);
|
||||||
if($res === false) {
|
if($res === false) {
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user