So this is more of a SQLite question.

I've been trying to move my TH1 search function to a FTS table
lately too. But it really only worked from SQlite or Fsl >
Admin > SQL.
In TH1 query{} calls it just returns SQLITE_AUTH errors.

  query "SELECT * FROM fx_search WHERE content MATCH 'test'" { }

After adding some debug%s to report_query_authorizer(), I got

 SQLITE_AUTH: not authorized 
 SQLITE_AUTH: authorization denied 
 SQLITE_ERROR: vtable constructor failed: fx_search 
 SQL error:  only SELECT statements are allowed (code: 23, sqlite_master
 type main )

19 and 23 refer to SQLITE_PRAGMA and SQLITE_UPDATE query codes.
https://www.sqlite.org/c3ref/c_alter_table.html
PRAGMA is probably acceptable to enable. But allowing UPDATE seems
overkill just to allow a fulltext search from TH1.

And I'm not really sure what the FTS vtable modules need to do. It's
probably something with _segments or _segdir subtables or updating
the sqlite_autoindex_fx_search_segdir_1 perhaps.

Can the runtime restructuring/indexing/? be disabled somehow for
FTS3 or FTS4 in a Fossil build? 

_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to