• Add a custom FTS5 tokenizer.

    class MyTokenizer : FTS5CustomTokenizer { ... }
    db.add(tokenizer: MyTokenizer.self)
  • Creates an FTS5 tokenizer, given its descriptor.

    let unicode61 = try db.makeTokenizer(.unicode61())

    It is a programmer error to use the tokenizer outside of a protected database queue, or after the database has been closed.

    Use this method when you implement a custom wrapper tokenizer:

    final class MyTokenizer : FTS5WrapperTokenizer {
        var wrappedTokenizer: FTS5Tokenizer
        init(db: Database, arguments: [String]) throws {
            wrappedTokenizer = try db.makeTokenizer(.unicode61())