Skip to main content

Crate fsqlite_ext_fts5

Crate fsqlite_ext_fts5 

Source
Expand description

FTS5 full-text search extension (§14.2).

Provides: tokenizer API (unicode61, ascii, porter, trigram), inverted index, boolean query parsing (implicit AND, OR, NOT binary-only, phrase, prefix, NEAR, column filter, caret), BM25 ranking, FTS5 virtual table with content modes, and secure-delete / contentless-delete configuration.

Structs§

AsciiTokenizer
ASCII tokenizer: like unicode61 but only ASCII alphanumeric characters.
Fts5Config
Fts5Cursor
FTS5 cursor for scanning query results.
Fts5HighlightFunc
highlight(text, query, open, close) — highlight FTS5 query terms in text.
Fts5QueryToken
A token in an FTS5 query.
Fts5SnippetFunc
snippet(text, query, open, close, ellipsis, max_tokens) — derive a highlighted snippet from text using FTS5 query terms.
Fts5SourceIdFunc
fts5_source_id() — returns the FTS5 extension version string.
Fts5Table
FTS5 virtual table: full-text search index.
Fts5Token
A single token produced by an FTS5 tokenizer.
InvertedIndex
In-memory inverted index for FTS5.
PorterTokenizer
Porter stemmer tokenizer: wraps another tokenizer and applies Porter stemming to each term.
Posting
TrigramTokenizer
Trigram tokenizer: generates all 3-character substrings of the input.
Unicode61Tokenizer
Unicode61 tokenizer: splits on non-alphanumeric characters, lowercases.

Enums§

ContentMode
DeleteAction
DetailMode
Fts5Expr
A parsed FTS5 query expression tree.
Fts5QueryError
FTS5 query validation errors.
Fts5QueryTokenKind
Token kinds in an FTS5 query.

Traits§

Fts5Tokenizer
Trait for FTS5 tokenizers.

Functions§

bm25_score
Compute BM25 score for a document against a set of query terms.
build_expr
Build an expression tree from parsed FTS5 query tokens.
create_tokenizer
Create a tokenizer by name with optional arguments.
evaluate_expr
Evaluate an FTS5 expression against the inverted index, returning matching document IDs.
extension_name
highlight
Generate a highlighted version of text with matching terms wrapped in markers.
parse_fts5_query
Parse an FTS5 query string into tokens.
register_fts5_scalars
Register FTS5 scalar functions into a FunctionRegistry.
snippet
Generate a snippet of text around matching terms.