Release v0.1.2 (What’s new?).
Welcome to sayt2 (Search As You Type) Documentation¶
sayt2 is a Python library that provides a Google-like search-as-you-type experience on your own dataset. It lets you quickly build a full-text search index from a list of dictionaries and start searching immediately. Powered by tantivy (a Rust-based search engine), it delivers fast indexing and querying with minimal setup.
Features:
Multiple search modes: ngram (substring matching), full-text (BM25), fuzzy (typo-tolerant), field-specific, and range queries.
Sorting: single-field and multi-field sorting on numeric and datetime fields.
Query language: Lucene-style syntax with boolean operators (
AND,OR), range expressions (year:[2020 TO 2025]), and field-specific queries (author:smith).Two-layer disk cache: automatic caching of data freshness (L1) and query results (L2), with schema-aware invalidation.
Cross-process safety: SQLite-backed atomic locking prevents concurrent index corruption.
Pydantic configuration: all settings are validated pydantic models with IDE autocompletion support.
Install¶
sayt2 is released on PyPI, so all you need is to:
$ pip install sayt2
To upgrade to latest version:
$ pip install --upgrade sayt2