Documentation

This commit is contained in:
Gwendal Roué committed 2016-10-11 05:05:25 +02:00
1 parent 44b59eea58
commit fdeb07f82b
1 file changed
+21
+21
View File
@@ -0,0 +1,21 @@
Custom FTS5 Tokenizers
======================
**[FTS5](https://www.sqlite.org/fts5.html) 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 as `ascii`, `unicode61`, and `porter`.
- `FTS5CustomTokenizer`: the low-level protocol for all custom tokenizers.
- `FTS5WrapperTokenizer`: the high-level protocol for custom tokenizers that wrap an existing tokenizer, and post-processes its tokens.