pypaginate.adapters.memory.search
In-memory search backend.
Implements the SearchBackend protocol for Python sequences. Non-fuzzy
match-filtering (exact / prefix / contains) delegates to the native _core
engine (so it normalizes identically to the ranked SearchEngine and the
resident Dataset); FuzzyMode.FUZZY uses a small adapter-level
similarity match (substring fast path + character-overlap score).
Classes
Search backend for in-memory sequences. |
Module Contents
- class pypaginate.adapters.memory.search.MemorySearchBackend
Search backend for in-memory sequences.
- static apply_search(query: object, spec: pypaginate.domain.specs.SearchSpec) object
Apply a search spec to a sequence.
- Parameters:
query – A Python sequence of items.
spec – Search specification with query and fields.
- Returns:
Filtered list of items matching the search (original order).