mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-25 04:07:47 +00:00
934 B
934 B
Custom FTS5 Tokenizers
FTS5 is an extensible full-text search engine.
GRDB lets you define your own custom FST5 tokenizers, and extend SQLite built-in tokenizers. Possible use cases are:
- Have "fi" match the ligature "fi" (U+FB01)
- Have "first" match "1st"
- Have "Encyclopaedia" match "Encyclopædia"
- Have "Mueller" match "Müller", and "Grossman" match "Großmann"
- Prevent "the" and other stop words from matching any document
The Tokenizer Protocols
-
FTS5Tokenizer: the protocol for all FTS5 tokenizers, including built-in tokenizers such asascii,unicode61, andporter.-
FTS5CustomTokenizer: the low-level protocol for all custom tokenizers, close to the FTS5 metal.FTS5WrapperTokenizer: the high-level protocol for custom tokenizers that wrap an existing tokenizer, and post-processes its tokens.
-