I am currently working on writing a custom tokenizer for use with a FTS3
indexed database. I believe I have written the new tokenizer module
correctly and am just missing something with registering the tokenizer
with the database.
To verify this I copied the simple_tokenizer1.c to a new file and
replaced all instances of 'simple' with 'unaccent'.
The following code was used to register the tokenizer.
sqlite3_stmt *pStmt;
const char *zSql = "SELECT fts3_tokenizer(?, ?)";
rc = sqlite3_prepare_v2(ldb_con, zSql, -1, &pStmt, 0);
if( rc!=SQLITE_OK ){
return rc;
}
rc = sqlite3_bind_text(pStmt, 1, "unaccent", -1,
SQLITE_STATIC);
rc = sqlite3_bind_blob(pStmt, 2, &p, sizeof(p),
SQLITE_STATIC);
rc = sqlite3_step(pStmt);
rc = sqlite3_finalize(pStmt);
SQLITE_OK is the final rc.
When I try to create a table using the new tokenizer I get a segfault in
sqlite3Fts3InitTokenizer(). The code to create the table is:
query = "CREATE VIRTUAL TABLE testTable USING fts3
(tokenize='unaccent');";
rc = db_run_query_on_con (ldb_con, query, LOCAL_DB_ROOT,
false);
Am I missing something obvious?
Thanks,
Travis Orr
IVL Audio Inc.
#3-6703 Rajpur Place
Victoria BC
V8M 1Z5
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users