create 'notindexed' option in CREATE TABLE for sqlite < 3.8.0

This commit is contained in:
Uwe Steinmann 2016-03-15 15:59:45 +01:00
parent 280a9b4b71
commit f332371dde

View File

@ -61,7 +61,11 @@ class SeedDMS_SQLiteFTS_Indexer {
/* Make sure the sequence of fields is identical to the field list
* 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);
if($res === false) {
return null;