Comments (1)
Well without the full traceback this was really not helpful as to debugging where exactly sqlite-web is running into problems with the missing tokenizer. Even if sqlite-browser can open the database file, I'm dubious whether you can actually query the full-text index table without the custom tokenizer.
In order to query the full-text search tables, you'll need Mozilla's custom mozporter
shared library. It doesn't come offered as a standalone extension, but it was fairly easy to compile one from the available sources: https://github.com/mozilla/releases-comm-central/tree/master/mailnews/extensions/fts3
To install the tokenizer automatically in a loadable extension, you'll want to modify the module registration function to register the tokenizer directly, e.g.
/* no error checking, just an example */
sqlite3_stmt *pStmt;
const char zSql[] = "SELECT fts3_tokenizer(?, ?)";
sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);
const static sqlite3_tokenizer_module* module;
sqlite3Fts3PorterTokenizerModule(&module);
sqlite3_bind_text(pStmt, 1, "mozporter", -1, SQLITE_STATIC);
sqlite3_bind_blob(pStmt, 2, &module, sizeof(module), SQLITE_STATIC);
sqlite3_step(pStmt);
sqlite3_finalize(pStmt);
I built such an extension locally and it works just fine:
sqlite> .load ./libmozporter
sqlite> CREATE VIRTUAL TABLE documents USING fts3(id, title, content, tokenize=mozporter);
sqlite> INSERT INTO documents ("title", "content") VALUES ('The title', 'This is the content of the message');
sqlite> SELECT title, rank(matchinfo(documents)) from documents where documents match 'contents';
The title|1.0
In order to get it working with the loadable extension support in sqlite-web
I did need to make a modification to ensure extensions are loaded before introspection occurs (see: ed80c34).
Once that was done, though, I had no problem running sqlite-web with the loadable extension, and viewing a FTS table using the mozporter tokenizer:
from sqlite-web.
Related Issues (20)
- How to specify SQLITE_WEB_PASSWORD in k8s deploy? HOT 1
- admin password is not encrypted and it's not secure HOT 3
- Docker Image for arm 64 HOT 1
- The switch from POST to GET for queries creates problems for queries with new lines inside the Home Assistant Addon HOT 15
- Forgotten DockerHub image HOT 3
- Bookmark drop down in query not visible on IOS devices HOT 2
- Log file is not created and logging is printed to console HOT 1
- Are other DB's planned? HOT 1
- Enabling foreign key constraints HOT 2
- Pagination styles HOT 1
- coleifer/sqlite-web on DockerHub seems not to be up to date HOT 3
- Serve sqlite-web in a flask end point HOT 1
- Large results are slow HOT 2
- Values are truncated HOT 1
- Disable hotkeys HOT 1
- Insert Tab checks all fields HOT 2
- ARM64 build is broken HOT 2
- Response time when docker is disconnected from internet HOT 1
- sqlite3.OperationalError: Could not decode to UTF-8 column HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sqlite-web.